Check02A - testVariable = input.nextDouble(); t

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.Scanner; import; i public class Check02A { public static void main(String[] args) { double testVariable; d Scanner input = new Scanner(; PrintStream output = System.out; P output.print("Enter any double to test: ");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: testVariable = input.nextDouble(); t output.println("Method Math.rint returns: " + Math.rint(testVariable)); output.println("While Math.round returns: " + Math.round(testVariable)); } }...
View Full Document

Ask a homework question - tutors are online