Java Programming Questions & Answers: part14



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

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

6.Select the invalid assignment statement(s) from the following: I. Float x = 238.88; II. Double y = 0x443; III. int n = (int) true; IV. long m =778645;

Both (I) and (III) above
Only (II) above
Both (II) and (IV) above
Both (I) and (II) above
All (I), (II), (III) and (IV) above.

7.Which access specifiers should be implemented in a class for all interface methods? I. Private. II. Public. III. Protected.

Only (I) above
Only (II) above
Only (III) above
Both (I) and (III) above
All (I), (II) and (III) above.

8.The type long can be used to store values in the following range:

-263 to 263-1
-231 to 231-1
-264 to 264
-232 to 232-1
232 to 264-1.

9.Which of the following is legal valid variable name?

1num
#twenty
@one
timeOfDay
temp val.

10.What will be the content of array variable table after executing the following code? for(int i=0; i<3; i++) for(int j=0; j<3; j++) if(j == i) table[i][j] = 1; else table[i][j] = 0;

1 0 00 1 00 0 1
0 0 00 0 00 0 0
1 0 01 1 01 1 1
0 0 10 1 01 0 0
0 0 0

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Failure defeats losers, failure inspires winners.-Robert T. Kiyosaki