99.6k views
5 votes
Given a floating point variable fraction, write a statement that displays the value of fraction on the screen. Do not display anything else on the screen-- just the value of fraction.

IN JAVA PLEASE

1 Answer

3 votes

Certainly, here's how you can display the value of the floating-point variable 'fraction' in Java:

  • System.out.println(fraction);

This statement will print the value of the 'fraction' variable to the screen.

User Tkachuko
by
8.5k points