A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
Need help;
kavin kumar
Greenhorn
Joined: Jul 21, 2005
Posts: 22
posted
Jul 26, 2005 06:52:00
0
class eq
{
public static void main(
String
arg[])
{
char c = 65;
double d = 10;
if(c==d)
{System.out.println("EQ");}
else
{System.out.println("Not EQ");}
}
}
This is a question from a mock exam(shahirsha)
answer is " EQ " as per mock exam author.
When i run this i got "Not EQ"
Any thoughts ?
Georgy Bolyuba
Ranch Hand
Joined: Feb 18, 2005
Posts: 162
posted
Jul 26, 2005 07:01:00
0
Originally posted by kavin kumar:
Any thoughts ?
One of two things: mock exam author is wrong or your compiler lies to you.
Pick one.
SCJP 1.4 (100%) Done.<br />SCJD (URLyBird 1.2.3 Started)
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Need help;
Similar Threads
equals method
Startup order Question
Long Post: Find 3 incorrect answers
practice example for young tigers: mixing equailty and autoboxing
equals, == and boxing/widening
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter