OCPJP 6
float fl = 2.5; looks good
float fl = 2.5f; why??? dont we already know its a float?
Subhash Kumar
Attitude is everything
Ernest Friedman-Hill wrote:The "L" at the end of longs (never, never, never use a lower case ell!)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
OCPJP 6
OCPJP 6
OCPJP 6
vinoth kumar k wrote:1/0 or 0/0 is supposed to throw an ArithmeticException!!! but here no!!
Cooool!! How does the 'D', do the magic???
Any interesting explanation for this?!
OCPJP 6
Campbell Ritchie wrote:long millisecondsInMonth = 31L * 24L * 60L * 60L * 1000L;
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
It's from Java Puzzlers by Bloch and Gafter.Rob Prime wrote: . . . That's a good example.
Vinoth Kumar Kannan wrote:My doubt is that, how a double type stores a String in it?? Its not a class to over ride the toString() method to check if the value is infinity and print "Infinity" - its just a primitive type.
OCPJP 6
Vinoth Kumar Kannan wrote:
May be as Ernest Friedman-Hill mentioned, it might result in a special bit-pattern, which when passed to System.out.println() gives "Infinity".
May be coded into the method implementation of println().
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |