Java Programming Questions & Answers: part14



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part14 : 11 to 15

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

11.We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the following keywords would achieve this?

Private or protected
Private
Protected
Public
Private or public.

12.Which of the following statements is/are valid array declarations? I. int number(); II. float average[]; III. double[] marks; IV. counter int[]; V. []double marks;

Both (II) and (III) above
Only (I) above
Both (I) and (III) above
Only (IV) above
Only (V) above.

13.What is the output of the following code? #216. What is the output of the following code? IdentifyMyParts a = new IdentifyMyParts(); IdentifyMyParts b = new IdentifyMyParts(); a.y = 5; b.y = 6; IdentifyMyParts.x = 1; b.x = 2; System.out.println("a.y = " + a.y); System.out.println("b.y = " + b.y); System.out.println("IdentifyMyParts.x = " + a.x); System.out.println("b.x = " + b.x);

a.y = 5
6
2
2
a.y = 5

14.What is the bit size of int in java?

8
16
32
64
128.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
If you are not willing to risk the usual you will have to settle for the ordinary- Jim Rohn