B
Bo Sun
hi,
I have the following piece of code:
public class test
{
//-----------------------------------------------------------------
// Reads the number of hours worked and calculates wages.
//-----------------------------------------------------------------
public static void main (String[] args)
{
double a = 1.0;
if (a == 1.0)
System.out.println("Hello");
}
}
why Hello is printed out? since ?i am comparing two double values?
Thanks in advance,
Bo
I have the following piece of code:
public class test
{
//-----------------------------------------------------------------
// Reads the number of hours worked and calculates wages.
//-----------------------------------------------------------------
public static void main (String[] args)
{
double a = 1.0;
if (a == 1.0)
System.out.println("Hello");
}
}
why Hello is printed out? since ?i am comparing two double values?
Thanks in advance,
Bo