Question: What are the outputs for the codes below? 1. int x = 25; x = x % 5; System.out.print(x); 2. System.out.print(7%3); 3. System.out.println(5/0); 4. System.out.print(15.7%5);

What are the outputs for the codes below?

1.

int x = 25;

x = x % 5;

System.out.print(x);

2.

System.out.print(7%3);

3.

System.out.println(5/0);

4.

System.out.print(15.7%5);

5.

double x = 5 / 3;

System.out.print(x);

6.

char x = A;

x - -;

System.out.print(x+3);

7.

System.out.print((double)4/2);

8.

System.out.print((double)3/6);

9.

int x = 5, y = 6;

int z = x + y;

double a = z;

System.out.print(a);

10.

System.out.print(9/11);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!