Java Programming Questions & Answers: part10



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part10 : 6 to 10

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

6.Which method that executes immediately after the init () method in an applet?

destroy()
start()
stop()
run()
exit().

7.Which of the following is true?

Any applet must be an instance of java.awt.Applet.
You must always provide a no-arg constuctor for an applet.
You must always provide a main method for an applet.
You must always override the init method in an applet.
You must always overload the init method in an applet.

8.What will the following program print when it is executed? public class Practice11 { public static void main(String args[]) { int i = 0; while (i < 3) { if( i++ == 0 ) System.out.print("Merry"); if( i == 1) System.out.print("Merr"); if( ++i == 2) System.out.print("Mer"); else System.out.print("Oh no!"); } } }

MerryMerrMer
MerryMerrMerOh no!
MerrMerOh no!
MerryMerrMerOh no!
erOh no!

9.Consider the following statements: #140. Consider the following statements: double mint[ ]; mint = new double[10]; Which of the following is an incorrect usage of System.in.read() with this array?

mint[0] = (double) System.in.read();
mint[1%1+1] = System.in.read();
mint[2] = (char) System.in.read();
mint[3] = System.in.read() * 2.5;
mint[0]= System.in.read(double);.

10.Select the correct statement from among the following:

Java language was developed by Micro Soft
Java language was developed in 1990
Java language was written by James Bond
The initial name given for Java is Oak
The project which developed Java is called Grand project.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Trust because you are willing to accept the risk, not because it’s safe or certain