<< < 17 18 19 20 21 22 23 24 25 26 27 > >>   Sort: Date

What is the difference between a while statement and a do statement?
What is the difference between a while statement and a do statement? A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will alw...
2013-06-12, 2237👍, 0💬

How are this and super used?
How are this and super used? this is used to refer to the current object instance. super is used to refer to the variables and methods of the superclass of the current object instance.
2013-01-10, 2236👍, 0💬

What is a void return type?
What is a void return type? A void return type indicates that a method does not return a value.
2013-01-07, 2236👍, 0💬

Difference between Swing and Awt?
Difference between Swing and Awt? AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.
2013-04-26, 2235👍, 0💬

What does it mean that a method or field is "static"?
What does it mean that a method or field is "static"? Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all in...
2013-02-11, 2235👍, 0💬

What are three ways in which a thread can enter the waiting state?
What are three ways in which a thread can enter the waiting state? A thread can enter the waiting state by invoking its sleep() method, by blocking on I/O, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. It can also enter the waiting state by invok...
2013-01-17, 2234👍, 0💬

Does Java pass by Value or reference?
Does Java pass by Value or reference? Its uses Reference while manipulating objects but pass by value when sending method arguments. Those who feel why I added this simple question in this section while claiming to be maintaining only strong and interesting questions, go ahead and answer following q...
2013-03-20, 2232👍, 0💬

What class of exceptions are generated by the Java run-time system?
What class of exceptions are generated by the Java run-time system? The Java runtime system generates RuntimeException and Error exceptions.
2012-12-24, 2232👍, 0💬

What are Checked and UnChecked Exception?
What are Checked and UnChecked Exception? A checked exception is some subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses. Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown. eg, IOExceptio...
2013-05-10, 2231👍, 0💬

WWhat is the difference between static and non-static variables?
WWhat is the difference between static and non-static variables? A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.
2013-06-12, 2230👍, 0💬

Can an application have multiple classes having main method?
Can an application have multiple classes having main method? Yes it is possible. While starting the application we mention the class name to be run. The JVM will look for the Main method only in the class whose name you have mentioned. Hence there is not conflict amongst the multiple classes having ...
2013-05-08, 2229👍, 0💬

When to Use the Incremental Low Pause Collector?
When to Use the Incremental Low Pause Collector? Use the incremental low pause collector when your application can afford to trade longer and more frequent young generation garbage collection pauses for shorter tenured generation pauses. A typical situation is one in which a larger tenured generatio...
2013-03-28, 2229👍, 0💬

Difference between HashMap and HashTable?
Difference between HashMap and HashTable? The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt allow). HashMap does not guarantee that the order of the map will remain constant ...
2013-04-25, 2228👍, 0💬

What are the high-level thread states?
What are the high-level thread states? The high-level thread states are ready, running, waiting, and dead.
2012-11-02, 2228👍, 0💬

What modifiers are allowed for methods in an Interface?
What modifiers are allowed for methods in an Interface? Only public and abstract modifiers are allowed for methods in interfaces.
2013-06-19, 2227👍, 0💬

What is Service Locator pattern?
What is Service Locator pattern? The Service Locator pattern locates J2EE (Java 2 Platform, Enterprise Edition) services for clients and thus abstracts the complexity of network operation and J2EE service lookup as EJB (Enterprise JavaBean) Home and JMS (Java Message Service) component factories. Th...
2013-03-14, 2227👍, 0💬

The superclass constructor runs before the subclass constructor ...
The superclass constructor runs before the subclass constructor ... The superclass constructor runs before the subclass constructor. The subclass's version of the overridable method will be invoked before the subclass's constructor has been invoked. If the subclass's overridable method depends on th...
2013-03-06, 2227👍, 0💬

What one should take care of while serializing the object?
What one should take care of while serializing the object? One should make sure that all the included objects are also serializable. If any of the objects is not serializable then it throws a NotSerializableException.
2013-05-23, 2226👍, 0💬

How are the elements of a GridBagLayout organized?
How are the elements of a GridBagLayout organized? The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.
2012-12-07, 2226👍, 0💬

What is the Map interface?
What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
2012-11-26, 2226👍, 0💬

What is AggressiveHeap?
What is AggressiveHeap? The -XX:+AggressiveHeap option inspects the machine resources (size of memory and number of processors) and attempts to set various parameters to be optimal for long-running, memory allocation-intensive jobs. It was originally intended for machines with large amounts of memor...
2013-03-26, 2225👍, 0💬

What is the List interface?
What is the List interface? The List interface provides support for ordered collections of objects.
2013-04-02, 2224👍, 0💬

What restrictions are placed on method overriding?
What restrictions are placed on method overriding? Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method...
2013-01-14, 2224👍, 0💬

What is an Iterator?
What is an Iterator? Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collectio...
2013-04-29, 2222👍, 0💬

<< < 17 18 19 20 21 22 23 24 25 26 27 > >>   Sort: Date