<< < 21 22 23 24 25 26 27 >   Sort: Date

Do I need to import java.lang package any time? Why ?
Do I need to import java.lang package any time? Why ? No. It is by default loaded internally by the JVM.
2013-05-09, 2170👍, 0💬

Explain garbage collection?
Explain garbage collection? Garbage collection is one of the most important feature of Java. Garbage collection is also called automatic memory management as JVM automatically removes the unused variables/objects (value is null) from the memory. User program cann't directly free the object from memo...
2013-02-26, 2167👍, 0💬

What are class members and Instance members?
What are class members and Instance members? Any global members(Variables, methods etc.) which are static are called as Class level members and those which are non-static are called as Instance level members.
2013-03-19, 2164👍, 0💬

What will be the output on executing the following code .
What will be the output on executing the following code . What will be the output on executing the following code. public class MyClass { public static void main (String args[] ) { int abc[] = new int [5]; System.out.println(abc); } } A Error array not initialized B 5 C null D Print some junk charac...
2013-03-08, 2163👍, 0💬

Name four Container classes.
Name four Container classes. Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
2012-12-21, 2163👍, 0💬

When does the compiler supply a default constructor for a class?
When does the compiler supply a default constructor for a class? The compiler supplies a default constructor for a class if no other constructors are provided.
2012-12-14, 2162👍, 0💬

Use the Externalizable interface when you need complete control over your Bean's serialization (for example, when writing and r
Use the Externalizable interface when you need complete control over your Bean's serialization (for example, when writing and reading a specific file format). No. Earlier order is maintained.
2013-03-08, 2158👍, 0💬

Under what conditions is an object's finalize() method invoked by the garbage collector?
Under what conditions is an object's finalize() method invoked by the garbage collector? The garbage collector invokes an object's finalize() method when it detects that the object has become unreachable.
2012-12-26, 2156👍, 0💬

Objects are passed by value or by reference?
Objects are passed by value or by reference? Java only supports pass by value. With objects, the object reference itself is passed by value and so both the original reference and parameter copy both refer to the same object .
2013-05-17, 2153👍, 0💬

What are the restrictions placed on static method ?
What are the restrictions placed on static method ? We cannot override static methods. We cannot access any object variables inside static method. Also the this reference also not available in static methods.
2013-03-12, 2152👍, 0💬

How you can force the garbage collection?
How you can force the garbage collection? Garbage collection automatic process and can't be forced.
2013-02-27, 2147👍, 0💬

What is OOPS?
What is OOPS? OOP is the common abbreviation for Object-Oriented Programming.
2013-02-27, 2146👍, 0💬

Can an unreachable object become reachable again?
Can an unreachable object become reachable again? An unreachable object may become reachable again. This can happen when the object's finalize() method is invoked and the object performs an operation which causes it to become accessible to reachable objects.
2013-06-17, 2144👍, 0💬

What is the difference between a field variable and a local variable?
What is the difference between a field variable and a local variable? A field variable is a variable that is declared as a member of a class. A local variable is a variable that is declared local to a method.
2012-12-25, 2143👍, 0💬

Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()?
Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()? The import statement does not bring methods into your local name space. It lets you abbreviate class names, but not get rid of them altogether. That's just the way it works, you'll get used to it. It's really a lot safer this ...
2013-02-15, 2142👍, 0💬

What is the difference between a constructor and a method?
What is the difference between a constructor and a method? A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator. A method is an ordinary member function of a cla...
2013-04-29, 2140👍, 0💬

What are the two basic ways in which classes that can be run as threads may be defined?
What are the two basic ways in which classes that can be run as threads may be defined? A thread class may be declared as a subclass of Thread, or it may implement the Runnable interface.
2013-01-31, 2138👍, 0💬

What is a Throughput Collector?
What is a Throughput Collector? The throughput collector is a generational collector similar to the default collector but with multiple threads used to do the minor collection. The major collections are essentially the same as with the default collector. By default on a host with N CPUs, the through...
2013-03-25, 2137👍, 0💬

How can we make a class Singleton
How can we make a class Singleton A) If the class is Serializable class Singleton implements Serializable { private static Singleton instance; private Singleton() { } public static synchronized Singleton getInstance() { if (instance == null) instance = new Singleton(); return instance; } /** If the ...
2013-03-18, 2137👍, 0💬

What is Session Facade pattern?
What is Session Facade pattern? Session facade is one design pattern that is often used while developing enterprise applications. It is implemented as a higher level component (i.e.: Session EJB), and it contains all the iteractions between low level components (i.e.: Entity EJB). It then provides a...
2013-03-15, 2133👍, 0💬

What methods are used to get and set the text label displayed by a Button object?
What methods are used to get and set the text label displayed by a Button object? getLabel() and setLabel()
2013-01-30, 2131👍, 0💬

How are this() and super() used with constructors?
How are this() and super() used with constructors? This() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.
2013-06-13, 2130👍, 0💬

Which methods of Serializable interface should I implement?
Which methods of Serializable interface should I implement? The serializable interface is an empty interface, it does not contain any methods. So we do not implement any methods.
2013-05-20, 2130👍, 0💬

What will be the output on executing the following code...
What will be the output on executing the following code... What will be the output on executing the following code. public class MyClass { public static void main (String args[] ) { int abc[] = new int [5]; System.out.println(abc[0]); } } A Error array not initialized B 5 C 0 D Print some junk chara...
2013-03-11, 2130👍, 0💬

<< < 21 22 23 24 25 26 27 >   Sort: Date