Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
Long.MAX_VALUE and Integer.MAX_VALUE
Fethi Altunyuva
Greenhorn
Posts: 2
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I could not understand why is output not same for Long and Integer classes.
Output is :
true
false
Can anybody explain thanks...
class Compare{ public static void main(String args[]) { System.out.println (compare(Long.MAX_VALUE,Long.MAX_VALUE)); System.out.println (compare(Integer.MAX_VALUE,Integer.MAX_VALUE)); } public static boolean compare(double d, float f){ return d==f; } }
Fethi Altunyuva
Greenhorn
Posts: 2
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am very sorry, this topic is discussed in another topic...
I apologize....
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Wrapper-Q
comparing MAX Values of Wrapper class with float and double
Confusing outputs
Wrapper(==)-Q
why Integer is behaving differently ??
More...