Java Multiple Choice Questions

  1. Overloaded methods are differentiated by
    1. Number of arguments
    2. Data type of arguments
    3. Number and the Data type of the arguments
    4. None of the above
Answer :
C
Explanation:
Added By : Prashant

  1. Which keyword is used to inherit class?
    1. inherit
    2. extends
    3. inheritance
    4. extend
Answer :
B
Explanation:
Added By : Prashant


  1. Which method of System class is used to copy array?
    1. copyArray
    2. arrayCopy
    3. arraycopy
    4. arrCopy
Answer :
C
Explanation:
Added By : Deeksha

  1. Which is right way to creating an array of integer?
    1. javaArray = new int[10];
    2. javaArray new = myArray[10];
    3. int[] javaArray = new int[10];
    4. A and C Both
Answer :
D
Explanation:
Added By : Deeksha

  1. Which is right way to declare Array?
    1. int[] myArray;
    2. int myArray[];
    3. int []myArray;
    4. A and B Both
Answer :
D
Explanation:
Added By : Deeksha

  1. How integer literal can expressed binary data?
    1. int binaryData = b11010;
    2. int binaryData = bx11010;
    3. int binaryData = 0b11010;
    4. int binaryData = xb11010;
Answer :
C
Explanation:
Added By : Deeksha


  1. If you access an uninitialized local variable will result?
    1. Syntax Error
    2. Compile Time Error
    3. Run Time Error
    4. No Error
Answer :
B
Explanation:
Added By : Deeksha

  1. How many type of Primitive Data Types exist in Java?
    1. 5
    2. 7
    3. 8
    4. 10
Answer :
C
Explanation:
Added By : Deeksha

Social Sharing
Search