Programming - Control Statements

You Are Here :: Home > JAVA > Control Statements - General Questions

 
1.

How many types of Contro Statements are there?                        


A. 1 B. 2
C. 3 D. 4




2.

____________________ is a control statement to execute a single statement or a block of code, when the given condition is true and if it is false then it skips if block and rest code of program is executed .                        


A. If Statement B. if else statement
C. nested if statement D. none




3.

The ____________ statement is an extension of if statement that provides another option when 'if' statement evaluates to "false" i.e. else block is executed if "if" statement is false.                         


A. nested if statement B. If Statement
C. if-else D. all the above




4.

The keyword ___________ is followed by an expression that should evaluates to byte, short, char or int primitive data types ,only. In a switch block there can be one or more labeled cases.                        


A. while B. switch
C. do-while D. break




5.

The expression that creates labels for the case must be _____________.                        


A. different B. unique
C. both a and b D. none




6.

which one is looping or repeating statement?                        


A. while B. do-while
C. both a and b D. all the above




1

2

3

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on