Java Programming Questions & Answers: part3



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part3 : 1 to 5

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

1.Consider the following program: class prob1{ int puzzel(int n){ int result; if (n==1) return 1; result = puzzel(n-1) * n; return result; } } class prob2{ public static void main(String args[]) { prob1 f = new prob1(); System.out.println(" puzzel of 6 is = " + f.puzzel(6)); } } Which of the following will be the output of the above program?

6
120
30
720
12.

2.What would the output be of the above Program - III before and after it is called?

and b before call : 15 20 a and b after call : 30 10
a and b before call : 5 2 a and b after call : 15 20
a and b before call : 15 20 a and b after call : 15 20
a and b before call : 30 10 a and b after call : 15 20
a and b before call : 15 20 a and b after call :

3.In Java, a character constant’s value is its integer value in the ………………………character set.

EBCDIC
Unicode
ASCII
Binary
BCD.

4.System.out.println(a++);

3
2
4
10
Synatax error.

5.System.out.println( - -b * a + c *d - -);

21
24
28
26
22.

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