Math Test

Last updated over 1 year ago
7 questions
1

What is output by the code below?
double x = .5 + .5;
System.out.print(x);

1

What is output by the code below?
int x = 1;
x *= 5;
System.out.print(x);

1

What is output by the code below?
System.out.print( 4 - 3 );

1

What is output by the code below?
System.out.print(4 % 3);

1

What is output by the code below?
System.out.print( (int)9.6 );

1

What is output by the code below?
int x = 12,
y = 20;
int z = x + y;
double a = z;
System.out.print(a);

1

What is output by the code below?
System.out.println( 7 / 0);