Set - 8

Question 31 :

How do you enable the concurrent garbage collector on Sun's JVM?

Answer :

-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.

Question 32 :

What is a platform?

Answer :

A platform is the hardware or software environment in which a program runs. Most platforms can be described as a combination of the operating system and hardware, like Windows 2000 and XP, Linux, Solaris, and MacOS.

Question 33 :

What is transient variable?

Answer :

Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written to an ObjectStream, the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.

Question 34 :

How to make a class or a bean serializable?

Answer :

By implementing either the interface, or the interface. As long as one class in a class's inheritance hierarchy implements Serializable or Externalizable, that class is serializable.

Question 35 :

What restrictions are placed on method overloading?

Answer :

Two methods may not have the same name and argument list but different return types.