Nahid
2005-01-24 18:51:47 UTC
Does the "==" sign call the "equals( )" automatically?
Rational g = new Rational ( 3, 1 );
Rational h = new Rational ( 3, 1 );
if (g == e)
System.out.println ( "equal" );
else
System.out.println ( "not equal" );
what would be the output? I got "not equal" when i ran it on my code? is
that what we are supposed to get?
Rational g = new Rational ( 3, 1 );
Rational h = new Rational ( 3, 1 );
if (g == e)
System.out.println ( "equal" );
else
System.out.println ( "not equal" );
what would be the output? I got "not equal" when i ran it on my code? is
that what we are supposed to get?