Professional Documents
Culture Documents
Revision 9 (4,5,7,9)
Revision 9 (4,5,7,9)
application
none
applets
objects
7.The smallest unit in a java program is known as.
Identifier
Token
Separators
JVM
8.Choose the odd one out:-
{}
>
;
,
9.Which of the following are valid comments?
(i) /* comment */
(ii) /* comment
(iii) // comment
(iv) */ comment */
true
false
11._________________is the name given to a variable, function or a class
literal
identifier
separator
Operator
12.A program in java is executed usually with _________________________.
branching control construct
sequential control construct
serial control construct
iterative control construct
13.double discount=bill>10000?(bill*10.0/100):(bill*50.0/100.0); when bill=9000
900.0
4500.0
400.0
compiling error
14.switch(x)
{case 'a':System.out.println("Discipline");
case 'b':System.out.println("Dedication");break;
case 'c':System.out.println("commitment");
default:System.out.println("Success");} when x='A'
Displine
Dedication
Success
commitment
15.if(c>d)
x=c;
else
x=d;
rewrite in ternary
(1 Point)
x=(c>d)?d:d;
x=(c>d)?c:c;
x=(c>d)?d:c;
x=(c>d)?c:d;