cool hit counter
Cafe4Java
Cafe4Java
 

Answers
A1)
Answer : C
Explanation :
  • A) A is incorrect because there is no primitive data type 'character'. The correct primitive data type is 'char'.
  • B) B is incorrect because there is no primitive data type 'character'. The correct primitive data type is 'char'.
  • D) D is incorrect because c within double quotes is a String literal, not a character literal.
  • E) E is incorrect because this is not the correct variable declaration syntax. In Java, the name of the data type precedes the name of the variable.
  • F) F is incorrect because this is not the correct variable declaration syntax. In Java, the name of the data type precedes the name of the variable.
  • G) G is incorrect because this is not the correct variable declaration syntax. In Java, the name of the data type precedes the name of the variable.
  • H) H is incorrect because this is not the correct variable declaration syntax. In Java, the name of the data type precedes the name of the variable.
  • I) I is incorrect because the correct option is C.


<<<< Return to Q1 <<<<<         >>>> Go to Q2 >>>>

Submit your feedback on this mock exam