Objective Type Question in Java Set(1)


Multiple choice question of Java

Set(1)

1. A java program hat can be developed and executed by the users is known as:

a) Application     b) Applet        c) Object       d) None

2. Who developed Java?

a) James Gosling      b) Robert James         c) Bjarne Stroustrup      d) None

3. Java Virtual Machine (JVM) is an:

a) Interpreter           b) Compiler                  c) Machine code    d) Byte code

4. To find the square root of a number which of the following package is required?

a) Java.txt                 b) java. Math               c) java. Lang           d) java.net

5. Which of the following is not a Java reserved word?

a) Private                  b) public                       c) break                     d) character

6. In java program. The comments are written using:

a) //                            b) /*……/*                    c) /*……*/                d) Both (a) and (c)

7) The term used to correct the error in a program, is known as:

a) bug                         b) debugging               c) error removing    d)none

8) The high level language program when converted to machine level is known as:

a) Source code       b) program code        c) object code            d) none

9) A constant which is gives the exact representation of data is called

a) Variable               b) literal                        c) identifier                  d) character

10) A word used in a high level language which has a special meaning attached to it is called

a)class                        b) identifier                  c) keyword                  d)  Literal

11) A character literal is assigned to a  

a) Char variable   b) Char type literal      c) String variable      d) string literal

12) A character literal is enclosed in:

a) ‘   ’                        b) “  “                                   c) :  :                                d)    {  }

13) A set of character is assigned to

a) String variable   b) Static variable      c) Boolean variable    d) none

14) Which of following is non primitive data?

a) Char                       b) long                           c) object                           d) short

15) Which of the following type is exact representation of fractional values?

a)  Char                     b) double                       c) byte                            d) String

 

 

Answer:

1)  a    2)  a    3)  a   4) b    5) c    6) d    7)  b    8)  c   9)  b   10)  c   11)   a   12)  a   13) a     14)  c    15)  b

Comments are closed.