52.1k views
4 votes
What is the output of inta= (int) 12.0 / 5 Systemoutprintln (a)

User Timbinous
by
7.6k points

1 Answer

0 votes

Answer:

Command: System.out.println (a)

Output: 2

Step-by-step explanation:

The output is going to be only the integer part of the division.

12 divided by 5 is integer part 2 with modulus 2. So

12/5 = 2 mod 2

The output is only the integer part. So

Command: System.out.println (a)

Output: 2

User Houssem
by
7.8k points

Related questions

1 answer
3 votes
102k views
asked Dec 19, 2020 16.3k views
Nimer asked Dec 19, 2020
by Nimer
8.5k points
1 answer
2 votes
16.3k views
1 answer
3 votes
58.1k views