πŸ“Š JAVA
Q. Which one of the following is a jump statement in java?
  • (A) goto
  • (B) jump
  • (C) break
  • (D) if
πŸ’¬ Discuss
βœ… Correct Answer: (C) break
πŸ“Š JAVA
Q. Which of these operators is used to allocate memory to array variable in Java?
  • (A) malloc
  • (B) alloc
  • (C) new
  • (D) new malloc
πŸ’¬ Discuss
βœ… Correct Answer: (C) new
πŸ“Š JAVA
Q. Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?
  • (A) do-while
  • (B) while
  • (C) for
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) do-while
πŸ“Š JAVA
Q. Which of these is necessary condition for automatic type conversion in Java?
  • (A) The destination type is smaller than source type.
  • (B) The destination type is larger than source type.
  • (C) The destination type can be larger or smaller than source type.
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) The destination type is larger than source type.
πŸ“Š JAVA
Q. What is the error in this code? byte b = 50; b = b * 50;
  • (A) b can not store the result 2500, limited by its range
  • (B) * operator has converted b * 50 into int, which can not be converted to byte without casting.
  • (C) b can not contain value 50.
  • (D) No error in this code
πŸ’¬ Discuss
βœ… Correct Answer: (B) * operator has converted b * 50 into int, which can not be converted to byte without casting.
πŸ“Š JAVA
Q. Which of these is an incorrect array declaration?
  • (A) int arr[] = new int[5];
  • (B) int [] arr = new int[5];
  • (C) int arr[]; arr = new int[5];
  • (D) int arr[] = int [5] new
πŸ’¬ Discuss
βœ… Correct Answer: (D) int arr[] = int [5] new
πŸ“Š JAVA
Q. Which of these selection statements test only for equality?
  • (A) if
  • (B) switch
  • (C) Both a & b
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) switch
πŸ“Š JAVA
Q. Which of these are selection statements in Java?
  • (A) if
  • (B) for
  • (C) continue
  • (D) all of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) if
πŸ“Š JAVA
Q. Which of these jump statements can skip processing remainder of code in its body for a particular iteration?
  • (A) break
  • (B) return
  • (C) exit
  • (D) continue
πŸ’¬ Discuss
βœ… Correct Answer: (D) continue
πŸ“Š JAVA
Q. What is the value of the expression 2 & 3 ?
  • (A) 2
  • (B) 3
  • (C) 5
  • (D) 6
πŸ’¬ Discuss
βœ… Correct Answer: (A) 2