aspose file tools*
The moose likes Mock Exam Errata and the fly likes wRAPPER CLASS fLOAT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "wRAPPER CLASS fLOAT " Watch "wRAPPER CLASS fLOAT " New topic
Author

wRAPPER CLASS fLOAT

NAMRA3
Greenhorn

Joined: Jul 20, 2001
Posts: 1
tHE QUESTION IS :

public class Test {
public static void main(String args[]){
System.out.println("The value is :" + Float.POSITIVE_INFINITY==Float.NEGATIVE_INFINITY);
}
}
What will be the result ? True or false ?
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi,
The result will be false, using the logic we call COMMON SENSE.
The values POSITIVE_INFINITY and NEGATIVE_INFINITY are the farthest apart values known to humans ...
Regards,
Manfred
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Namra3,
Please read the JavaRanch Name Policy and re-register using a name that complies with the rules.
Thanks for your cooperation.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wRAPPER CLASS fLOAT
 
Similar Threads
Request to Bean
No ClassDefFoundError
Member class
System.out.println("i -->"+i); This statement give runtime error on linux
About Interfaces and Classes