This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes == primitive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "== primitive " Watch "== primitive " New topic

== primitive

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 477
I have a basic question.

widening conversion happened to the long at lin5 .so long is changed to double before == test.But when i printed out the x value that is giving only long value.(not giving double value)Why?
Marcos R Oliveira
Ranch Hand

Joined: Apr 20, 2002
Posts: 51
When long is changed to double before == test, it does not change the x type, nor this long is assigned to anything.
[ January 18, 2007: Message edited by: Marcos R Oliveira ]

SCJP 1.4 - SCJP 1.6 - SCWCD in progress
wood burning stoves
subject: == primitive
Similar Threads
finding closest point
primitive value
value of i?
Can anyone explain what is == and equal( ) ?
Why does this prog give the above result?