• 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