Hi All,
These Questions r 4rm KHALID's MOCK >>>>
Q.1.
The 8859-1 character code for the uppercase letter A is 65. Which of these code fragments declare and initialize a variable of type char with this value?
a. char ch=65;
b. char ch='\65';
c. char ch='A';
d. char ch="A";
Answer is given only (d) .But wht. is the problem with option (a) !!
Q.2.
Which statements concerning the effect of the statement
gfx.drawRect(5, 5, 10, 10)
are true, given that gfx is a reference to a valid Graphics object?
a. The rectangle drawn will have a total width of 5 pixels.
b. The rectangle drawn will have a total height of 6 pixels.
c. The rectangle drawn will have a total width of 10 pixels.
d. The rectangle drawn will have a total height of 11 pixels.
My choice is (c) , BUT ,the answer is given (d) !! W H Y !!!
Pls..explan me this answer. as per dawRect constructor the width should be 10 . then..where I am going wrong ?
Another Question(not related to above) I was thinking to ask that
'IS MATH CLASS IS IMMUTABLE like
String or Wrapper class ? '
pleze,help me.
Thanks in advance.