What will the comparison operators in Java returns?
Boolean value
An integer
depends upon data type
both a and b
What is the procedure followed by break statement?
Terminates the whole program.
Terminate the enclosing switch statement.
Execute the appropriate switch statement.
All of them.
What value is placed in var? var=12>9?0:1;
0
1
9
12
Which of the following is correct for a program that breaks sequential flow and jumps to another part of the code?
Looping
Jumping
Branching
Exit Loop
What is a Java program?
Set of commands
Set of statements
Set of system calls
Set of operators
What is a chain of if in which the statement associated with each 'else' is an 'if'?
else if ladder
nested if...else
Switch case statement
Both a and b
What Value is placed in awk?
int x=5,y=19; awk=y-x>x-y?Y-x:X-Y;
5
19
14
-14
Consider the following code
if (number > 0)
System.out.println("Number of positive");
else
System .out.println("Number is Negative");
What will be the output if number is equal to 0?
Number is negative
Number is positive
Both 1 and 2
Number is zero
What is the buit-in multiway decision statement in Java?
if
else if
switch
loop
What is the output of the given program? int i =-1; if (i>-2) { System.Out.Println("India"); }
else { System.out.println("America"); }
Complication error
Run time error
India
America