This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Mock Exam Errata and the fly likes conversion from lower to higher? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "conversion from lower to higher?" Watch "conversion from lower to higher?" New topic
Author

conversion from lower to higher?

raj yagnik
Greenhorn

Joined: Feb 14, 2001
Posts: 15
if 2 primitives are compared then the lower is automatically get converted to the higher, so the answer was given to be true, why ?
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
Java can not compare two primatives of different types. So it can't compare an int to a double. It has to first convert the int to a double and then it will compare the two double values. So Java will convert the lower to a higher when two primatives are compared.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: conversion from lower to higher?
 
Similar Threads
Pls help.. Questions on Thread.
Possible to pass without studying?
Threads
SCJP 5: When are you taking the beta?
[Political]Post-war Iraq