This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help;

 
kavin kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kavin kumar:
Any thoughts ?


One of two things: mock exam author is wrong or your compiler lies to you.
Pick one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic