السبت، 8 يونيو 2013

Solved MCQ of Java set-4

1. In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called ............................. .
A) pre increment
B) post increment
C) incrementation
D) pre incrementation

2. When the operators are having the same priority, they are evaluated from .................  ............. in the order they appear in the expression.
A) right to left
B) left to right
C) any of the order
D) depends on compiler

3. In java,  ............. can only test for equality, where as ............ can evaluate any type of the Boolean expression.
A) switch, if
B) if, switch
C) if, break
D) continue, if

4. The ....................... looks only for a match between the value of the expression and one of its case constants.
A) if
B) match
C) switch
D) None of the above

5. System.in.read() is being used, the program must specify the .................. clause.
A) throws.java.out.IOException
B) throws.java.in.IOException
C) throws.java.io.IOException
D) throws.java.io.InException

6. By using ................... you can force immediate termination of a loop, by passing the conditional expression and any remaining code in the body of the loop.
A) Break
B) Continue
C) Terminate
D) Loop Close

7. The out object is an object encapsulated inside the ................. class, and represents the standard output device.
A) standard
B) local
C) globlal
D) system

8. The third type of comment is used by a tool called .................. for automatic generation of documentation.
A) Java commenting
B) Java generator
C) Java doc
D) Java loc

9. In the second type the information written in java after // is ignored by the .......................
A) Interpreter
B) Compiler
C) Programmer
D) All of the above

10. The compiled java program can run on any ..................... plateform having Java Virtual Machine (JVM) installed on it.
A) program
B) java
C) hardware
D) non java

Answers:

1.  A) pre increment
2.  B) left to right
3.  A) switch, if
4.  C) switch
5.  C) throws.java.io.IOException
6.  A) Break
7.  D) system
8.  C) Java doc
9.  B) Compiler
10.C) hardware

You Might also view the following Related Posts

ليست هناك تعليقات:

إرسال تعليق