MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
What is the numerical range of a char?
..
1.
What is the numerical range of a char?
A.
-128 to 127
B.
-(215) to (215) - 1
C.
0 to 32767
D.
D.
Answer» E.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
<p>The == operator can be used to compare two <em>String</em> objects. The result is always true if the two strings are identical.</p>
<p>Objects of a subclass can be assigned to a super class reference.</p>
<p>Objects of a super class can always be assigned to a subclass reference.</p>
<p>An individual array element from an array of type int, when passed to a method is passed by value.</p>
<p>An array in the Java programming language has the ability to store many different types of values.</p>
<p>Which three are valid declarations of a char?</p> <p>1.char c1 = 064770;</p> <p>2.char c2 = 'face';</p> <p>3.char c3 = 0xbeef;</p> <p>4.char c4 = u0022;</p> <p>5.char c5 = ' iface';</p> <p>6.char c6 = ' uface';</p>
<pre> <code class="language-java">public interface Foo { int k = 4; /* Line 3 */ }</code></pre> <p>Which three piece of codes are equivalent to line 3?</p> <p>1.final int k = 4;</p> <p>2.public int k = 4;</p> <p>3.static int k = 4;</p> <p>4.abstract int k = 4;</p> <p>5.volatile int k = 4;</p> <p>6.protected int k = 4;</p> <p> </p>
<p>Which three are legal array declarations?</p> <p>1.int [] myScores [];</p> <p>2.char [] myChars;</p> <p>3.int [6] myScores;</p> <p>4.Dog myDogs [];</p> <p>5.Dog myDogs [7];</p>
<p>Which four options describe the correct default values for array elements of the types indicated?</p> <p>1.int -> 0</p> <p>2.String -> "null"</p> <p>3.Dog -> null</p> <p>4.char -> ' u0000'</p> <p>5.float -> 0.0f</p> <p>6.boolean -> true</p>
<p>consider the statement "x = (a > b) ? a : b"; then the value of x is 27, if a = 18 and b = 27.</p>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply