Top 100+ Wipro Java Interview Questions And Answers
Question 1. What Is A Transient Variable?
Answer :
A temporary variable is a variable that won't be serialized.
Question 2. Which Containers Use A Border Layout As Their Default Layout?
Answer :
The window, Frame and Dialog instructions use a border layout as their default format.
Adv Java Interview Questions
Question 3. Why Do Threads Block On I/o?
Answer :
Threads block on i/o (that is enters the waiting country) in order that other threads may additionally execute at the same time as the i/o Operation is finished.
Question four. How Are Observer And Observable Used?
Answer :
Objects that subclass the Observable class keep a listing of observers. When an Observable item is up to date it invokes the replace() method of each of its observers to inform the observers that it has modified kingdom. The Observer interface is applied via items that examine Observable gadgets.
Adv Java Tutorial
Question 5. What Is Synchronization And Why Is It Important?
Answer :
With respect to multithreading, synchronization is the functionality to manipulate the get right of entry to of a couple of threads to shared assets. Without synchronization, it's miles possible for one thread to regulate a shared item whilst every other thread is within the technique of the use of or updating that object's fee. This frequently results in large errors.
J2EE Interview Questions
Question 6. Can A Lock Be Acquired On A Class?
Answer :
Yes, a lock may be received on a category. This lock is obtained at the class's Class object.
Question 7. What's New With The Stop(), Suspend() And Resume() Methods In Jdk 1.2?
Answer :
The forestall(), suspend() and resume() methods had been deprecated in JDK 1.2.
J2EE Tutorial Core Java Interview Questions
Question eight. Is Null A Keyword?
Answer :
The null cost is not a key-word.
Question 9. What Is The Preferred Size Of A Component?
Answer :
The favored size of a thing is the minimal thing length a good way to permit the aspect to show usually.
JSP Interview Questions
Question 10. What Method Is Used To Specify A Container's Layout?
Answer :
The setLayout() method is used to specify a field's layout.
Core Java Tutorial
Question eleven. Which Containers Use A Flowlayout As Their Default Layout?
Answer :
The Panel and Applet training use the FlowLayout as their default layout.
Java-Springs Interview Questions
Question 12. What State Does A Thread Enter When It Terminates Its Processing?
Answer :
When a thread terminates its processing, it enters the dead nation.
Adv Java Interview Questions
Question 13. What Is The Collections Api?
Answer :
The Collections API is a set of training and interfaces that aid operations on collections of objects.
JSP Tutorial
Question 14. Which Characters May Be Used As The Second Character Of An Identifier, But Not As The First Character Of An Identifier?
Answer :
The digits 0 through 9 may not be used because the first man or woman of an identifier however they will be used after the primary individual of an identifier.
Question 15. What Is The List Interface?
Answer :
The List interface presents support for ordered collections of objects.
JMS(Java Message Service) Interview Questions
Question 16. How Does Java Handle Integer Overflows And Underflows?
Answer :
It makes use of those low order bytes of the result which could match into the size of the type allowed by way of the operation.
Java-Springs Tutorial
Question 17. What Is The Vector Class?
Answer :
The Vector class gives the capability to put into effect a growable array of gadgets.
Java applet Interview Questions
Question 18. What Modifiers May Be Used With An Inner Class That Is A Member Of An Outer Class?
Answer :
A (non-neighborhood) internal class may be declared as public, included, private, static, very last, or abstract.
J2EE Interview Questions
Question 19. What Is An Iterator Interface?
Answer :
The Iterator interface is used to step via the factors of a Collection.
Java Tutorial
Question 20. What Is The Difference Between The >> And >>> Operators?
Answer :
The >> operator incorporates the signal bit whilst transferring proper. The >>> zero-fills bits which have been shifted out.
Java Interview Questions
Question 21. Which Method Of The Component Class Is Used To Set The Position And Size Of A Component?
Answer :
setBounds()
Question 22. How Many Bits Are Used To Represent Unicode, Ascii, Utf-sixteen, And Utf-eight Characters?
Answer :
Unicode calls for sixteen bits and ASCII require 7 bits. Although the ASCII man or woman set makes use of handiest 7 bits, it also includes represented as 8 bits. UTF-eight represents characters the use of 8, sixteen, and 18 bit patterns. UTF-sixteen makes use of 16-bit and larger bit styles.
Java 8 Tutorial
Question 23. What Is The Difference Between Yielding And Sleeping?
Answer :
When a challenge invokes its yield() approach, it returns to the prepared state. When a undertaking invokes its sleep() method, it returns to the ready kingdom.
Java eight Interview Questions
Question 24. Which Java.Util Classes And Interfaces Support Event Handling?
Answer :
The EventObject magnificence and the EventListener interface aid event processing.
Core Java Interview Questions
Question 25. Is Sizeof A Keyword?
Answer :
The sizeof operator isn't a key-word.
Question 26. What Are Wrapped Classes?
Answer :
Wrapped instructions are instructions that allow primitive sorts to be accessed as objects.
Java Programmer Interview Questions
Question 27. Does Garbage Collection Guarantee That A Program Will Not Run Out Of Memory?
Answer :
Garbage collection does not assure that a program will not run out of memory. It is possible for packages to use up reminiscence resources quicker than they may be garbage amassed. It is likewise feasible for applications to create gadgets that aren't subject to rubbish series.
JSP Interview Questions
Question 28. What Restrictions Are Placed On The Location Of A Package Statement Within A Source Code File?
Answer :
A bundle statement must appear because the first line in a supply code document (except for blank traces and remarks).
Question 29. Can An Object's Finalize() Method Be Invoked While It Is Reachable?
Answer :
An object's finalize() method cannot be invoked by way of the garbage collector even as the item remains available. However, an item's finalize() method can be invoked through other items.
Question 30. What Is The Immediate Superclass Of The Applet Class?
Answer :
Panel
Question 31. What Is The Difference Between Preemptive Scheduling And Time Slicing?
Answer :
Under preemptive scheduling, the highest priority assignment executes until it enters the waiting or lifeless states or a higher precedence project comes into existence. Under time reducing, a task executes for a predefined slice of time after which reenters the pool of ready responsibilities. The scheduler then determines which assignment should execute next, primarily based on precedence and other factors.
Question 32. Name Three Component Subclasses That Support Painting.
Answer :
The Canvas, Frame, Panel, and Applet training support portray.
Question 33. What Value Does Readline() Return When It Has Reached The End Of A File?
Answer :
The readLine() technique returns null while it has reached the end of a report.
Java-Springs Interview Questions
Question 34. What Is The Immediate Superclass Of The Dialog Class?
Answer :
Window
Question 35. What Is Clipping?
Answer :
Clipping is the procedure of confining paint operations to a restricted region or shape.
Question 36. What Is A Native Method?
Answer :
A local method is a method this is carried out in a language apart from Java.
JMS(Java Message Service) Interview Questions
Question 37. Can A For Statement Loop Indefinitely?
Answer :
Yes, a for statement can loop indefinitely. For instance, do not forget the following:
for(;Wink ;
Question 38. What Are Order Of Precedence And Associativity, And How Are They Used?
Answer :
Order of priority determines the order wherein operators are evaluated in expressions. Associatity determines whether or not an expression is evaluated left-to-right or right-to-left.
Question 39. When A Thread Blocks On I/o, What State Does It Enter?
Answer :
A thread enters the waiting kingdom while it blocks on I/O.
Question forty. To What Value Is A Variable Of The String Type Automatically Initialized?
Answer :
The default fee of an String kind is null.
Java applet Interview Questions
Question 41. What Is The Catch Or Declare Rule For Method Declarations?
Answer :
If a checked exception can be thrown within the frame of a technique, the approach have to both trap the exception or declare it in its throws clause.
Question 42. What Is The Difference Between A Menuitem And A Checkboxmenuitem?
Answer :
The CheckboxMenuItem magnificence extends the MenuItem magnificence to guide a menu object that can be checked or unchecked.
Java Interview Questions
Question forty three. What Is A Task's Priority And How Is It Used In Scheduling?
Answer :
A venture's priority is an integer value that identifies the relative order wherein it ought to be carried out with recognize to different responsibilities. The scheduler tries to schedule better priority tasks before decrease priority responsibilities.
Question forty four. What Class Is The Top Of The Awt Event Hierarchy?
Answer :
The java.Awt.AWTEvent elegance is the very best-degree elegance in the AWT occasion-class hierarchy.
Question 45. When A Thread Is Created And Started, What Is Its Initial State?
Answer :
A thread is within the prepared state after it's been created and commenced.
Question forty six. Can An Anonymous Class Be Declared As Implementing An Interface And Extending A Class?
Answer :
An anonymous elegance may additionally implement an interface or extend a superclass, however may not be declared to do both.
Question forty seven. What Is The Range Of The Short Type?
Answer :
The variety of the short type is -(2^15) to two^15 - 1.
Question forty eight. What Is The Range Of The Char Type?
Answer :
The variety of the char kind is zero to 2^sixteen - 1.
Question forty nine. In Which Package Are Most Of The Awt Events That Support The Event-delegation Model Defined?
Answer :
Most of the AWT-associated occasions of the event-delegation model are defined inside the java.Awt.Event bundle. The AWTEvent elegance is described inside the java.Awt package deal.
Question 50. What Is The Immediate Superclass Of Menu?
Answer :
MenuItem

