Q38)What line of code would begin execution of thread named myThread?
I gave answer: myThread.start(); WHICH I MISSED.I DON'T HOW? CAN ANYONE EXPLAIN & tell me correct answer.
Q50) I missed this.
Which of the following java.awt.Graphics methods would be used to draw outline of rectangle with single method call.
a)fillRect() b) drawRect() c) fillPolygon() d)drawPolygone()
e)drawLine()
Dave
int i=4;
i=i++;
i=i++;
System.out.println(i);
[/CODE]
What gets printed?
Nope, 6 is wrong. The correct answer is 4.
Try and compile it, and you'll probably be surprised, but if you look at what I wrote above, it might make sence.
Again, you take the value of the variable (i in this instance) to be used, increment it and then do the asignment, with the value you first took.
/Mike[/B]
Don't get me started about those stupid light bulbs. |