• Increase font size
  • Default font size
  • Decrease font size

Java Language

AddThis Social Bookmark Button

16.) What can cause a thread to stop executing?

A) The program exits via a call to System.exit(0);

B) Another thread is given a higher priority.

C) A call to the thread's stop method.

D) A call to the halt method of the Thread class.

View Answer

Answer: Option A, B, C

17.) What will happen when you attempt to compile and run the following code?

class Background implements Runnable{

int i = 0;

public int run(){

while (true) {




return 1;


}//End class

A) It will compile and the run method will print out the increasing value of i.

B) It will compile and calling start will print out the increasing value of i.

C) The code will cause an error at compile time.

D) Compilation will cause an error because while cannot take a parameter of true.

View Answer

Answer: Option C

18.) Who invented Java?

A) Netscape

B) Microsoft

C) Sun

D) None of the above is correct.

View Answer 

Answer: Option C

19.) To run a compiled Java program, the machine must have what loaded and running?

A.) Java virtual machine

B.) Java compiler

C.) Java bytecode

D.) A Web browser

View Answer

Answer: Option A

20.) What is not true of a Java bean?

A.) There are no public instance variables.

B.) All persistent values are accessed using getxxx and setxxx methods.

C.) It may have many constructors as necessary.

D.) All of the above are true of a Java bean.

View Answer

Answer: Option  C


Oracle Certification


The Oracle Certification Program is a professional certification program offered by the Oracle Corporation. There are three levels of Oracle Certification in several disciplines: Oracle Certified Associate (OCA), Oracle Certified Professional (OCP), and Oracle Certified Master (OCM).

Java Certification


Sun Certified Professional (SCP) is a professional certification program by Sun Microsystems, a subsidiary of Oracle Corporation. There are two levels of java Certification in several disciplines: Sun Certified Java Associate (SCJA), Sun Certified Java Programmer (SCJP), and Sun Certified Java Developer (SCJD)

Red Hat Certification


The Red Hat Certification Program is Red Hat's professional certification program for Red Hat and general Linux related skills such as system administration on Red Hat Enterprise Linux Red Hat Certified Technician (RHCT)  and Red Hat Certified Engineer (RHCE)