anushree
anushree
Alfred Raouf - Egypt - SCJP 1.4<br />Kemety.equals(Egyptian) // returns true
(2 * Byte.MAX_VALUE)
SCJP 1.4
byte b1 = (byte)(2 * Byte.MAX_VALUE);
SCJP 1.4
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Originally posted by Basanti Mathad:
what would be the result of this...can anybody explain how to go about with such questions?
class Blue {
public static void main (String[] args) {
byte b1 = (byte)(2 * Byte.MAX_VALUE);
byte b2 = -1;
byte b3 = -2;
byte b4 = -3;
System.out.println((b1==b2)+","+(b1==b3)+","+(b1==b4));
}
}
thank u,
basanti
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Originally posted by Bert Bates:
Other than a few key precedence rules like maybe casting and ++ and --, these complex precedence questions are just not on the scjp exam. Alfred, do you agree? These are interesting questions for sure, but unless you have all the other cert topics totally down cold, completely iced, absolutely mastered, you should spend your study time on another topic.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Evil is afoot. But this tiny ad is just an ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|