What will be the output of the following program?class equals { public static void main(string [] args) { int x = 100; double y = 100.1; boolean b = (x = y); /* line 7 */ system.out.println(b); }}?
Answers
Answered by
0
O/P: Compilation error.
The code should be modified as :
class equals
{
public static void main(String [] args)
{
int x = 100;
double y = 100.1;
boolean b = (x == y);
System.out.println(b);
}
}
The code should be modified as :
class equals
{
public static void main(String [] args)
{
int x = 100;
double y = 100.1;
boolean b = (x == y);
System.out.println(b);
}
}
Similar questions