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

What is Externalizable?
What is Externalizable? Externalizable is an Interface that extends Serializable Interface. And sends data into Streams in Compressed Format. It has two methods, writeExternal(ObjectOuput out) and readExternal(ObjectInput in)
2013-06-18, 1924👍, 0💬

What is a compilation unit?
What is a compilation unit? A compilation unit is a Java source code file.
2013-01-11, 1924👍, 0💬

What is the purpose of finalization?
What is the purpose of finalization? The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
2013-06-11, 1923👍, 0💬

What is a local, member and a class variable?
What is a local, member and a class variable? Variables declared within a method are "local" variables. Variables declared within the class i.e not within any methods are "member" variables (global variables). Variables declared within the class i.e not within any methods and are defined as "static"...
2013-02-06, 1923👍, 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, 1920👍, 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, 1919👍, 0💬

Does Java provide any construct to find out the size of an object?
Does Java provide any construct to find out the size of an object? No there is not sizeof operator in Java. So there is not direct way to determine the size of an object directly in Java.
2013-05-24, 1919👍, 0💬

Can I have multiple main methods in the same class?
Can I have multiple main methods in the same class? No the program fails to compile. The compiler says that the main method is already defined in the class.
2013-05-08, 1919👍, 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, 1918👍, 0💬

How do you enable the concurrent garbage collector on Sun's JVM?
How do you enable the concurrent garbage collector on Sun's JVM? -Xconcgc options allows us to use concurrent garbage collector (1.2.2_07+)we can also use -XX:+UseConcMarkSweepGC which is available beginning with J2SE 1.4.1.
2013-03-28, 1918👍, 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, 1917👍, 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, 1916👍, 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, 1916👍, 0💬

How does an exception permeate through the code?
How does an exception permeate through the code? An unhandled exception moves up the method stack in search of a matching When an exception is thrown from a code which is wrapped in a try block followed by one or more catch blocks, a search is made for matching catch block. If a matching type is fou...
2013-05-31, 1913👍, 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, 1913👍, 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, 1912👍, 0💬

What is Externalizable interface?
What is Externalizable interface? Externalizable is an interface which contains two methods readExternal and writeExternal. These methods give you a control over the serialization mechanism. Thus if your class implements this interface, you can customize the serialization process by implementing the...
2013-05-22, 1911👍, 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, 1910👍, 0💬

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, 1909👍, 0💬

How does a try statement determine which catch clause should be used to handle an exception?
How does a try statement determine which catch clause should be used to handle an exception? When an exception is thrown within the body of a try statement, the catch clauses of the try statement are examined in the order in which they appear. The first catch clause that is capable of handling the e...
2013-01-28, 1909👍, 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, 1907👍, 0💬

For which statements does it make sense to use a label?
For which statements does it make sense to use a label? The only statements for which it makes sense to use a label are those statements that can enclose a break or continue statement.
2012-11-27, 1907👍, 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, 1906👍, 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, 1906👍, 0💬

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