Answer: valid Java identifier : Questions « Java Source And Data Type « SCJP






B and D. 

Digits may not be used as the first character of an identifier.








1.29.Questions
1.29.1.Which of the following are valid Java identifiers?
1.29.2.Answer: Java identifier
1.29.3.Which of the following are valid Java identifiers(2)?
1.29.4.Answer: valid Java identifier
1.29.5.Which of the following are Java keywords?
1.29.6.Answer: Java keywords
1.29.7.Which of the following are Java keywords(2)?
1.29.8.Answer: Java keywords(2)
1.29.9.Which of the following are primitive types?
1.29.10.Answer: primitive types
1.29.11.What is the range of the short type?
1.29.12.Answer: range of short type
1.29.13.What is the range of the char type?
1.29.14.Answer: range of char type
1.29.15.What is the output from the following statement?
1.29.16.Answer: comments
1.29.17.Which of the following are valid double literals?
1.29.18.Answer: double literals
1.29.19.What is the output of the following program(boolean value)?
1.29.20.Answer: boolean array
1.29.21.What is the output of the following program(Object)?
1.29.22.Answer: Object array
1.29.23.What will happen when you try to compile and run the following application?
1.29.24.Answer: Object array element
1.29.25.What is the output from the following code(hexadecimal calculation)?
1.29.26.Answer: hexadecimal calculation
1.29.27.What happens when you attempt to compile and run the following code?
1.29.28.Answer: static method and static variable
1.29.29.What would be the result of running the following method?
1.29.30.Answer: binary or
1.29.31.How many String objects are created in the following code?
1.29.32.Answer: String object
1.29.33.Does the following code cause a compiler error(char range)?
1.29.34.Answer: char range
1.29.35.Does the following code cause a compiler error(unicode char)?
1.29.36.Answer: unicode char
1.29.37.Does the following code cause a compiler error(char type casting)?
1.29.38.Answer: char type casting
1.29.39.Does the following code cause a compiler error(long and char type)?
1.29.40.Answer: long and char type
1.29.41.Does the following code cause a compiler error(char and string)?
1.29.42.Answer: char and string
1.29.43.What happens when you try to compile and run the following code(Long type comparison)?
1.29.44.Answer: Long type comparison
1.29.45.What happens when you try to compile and run the following code?
1.29.46.Answer: char and long and unicode
1.29.47.What would happen if you tried to compile and run the following code(wapper class)?
1.29.48.Answer: wapper class
1.29.49.What would happen if you tried to compile and run the following code?
1.29.50.Answer: Long.equals