Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
Java Programming
»
Language Fundamentals
What is the numerical range of a char?
-128 to 127
-(215) to (215) - 1
0 to 32767
0 to 65535
Correct Answer:
0 to 65535
Explanation:
A
char
is really a 16-bit integer behind the scenes, so it supports 2
16
(from 0 to 65535) values.
← Previous Question
Next Question→
More Questions from
Language Fundamentals
Which is a valid declarations of a String?
Which is a valid keyword in java?
Which one of the following will declare an array and initialize it with five numbers?
Which three are valid declarations of a float? float f1 = -343; float f2 = 3.14; float f3 = 0x12345; float f4 = 42e7; float f5 = 2001.0D; float f6 = 2.81F;
Which is a reserved word in the Java programming language?
Which three are valid declarations of a char? char c1 = 064770; char c2 = 'face'; char c3 = 0xbeef; char c4 = \u0022; char c5 = '\iface'; char c6 = '\uface';
Which four options describe the correct default values for array elements of the types indicated? int -> 0 String -> "null" Dog -> null char -> '\u0000' float -> 0.0f boolean -> true
Which one of these lists contains only Java programming language keywords?
Which three are legal array declarations? int [] myScores []; char [] myChars; int [6] myScores; Dog myDogs []; Dog myDogs [7];
Which will legally declare, construct, and initialize an array?
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments