ScannerExample - System.out.println("Enter a...

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

View Full Document Right Arrow Icon
import java.util.Scanner; public class ScannerExample { // a class to demonstrate interactive input / public static void main(String [] args) { p Scanner input=new Scanner(;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("Enter a number:"); double a = input.nextDouble(); System.out.println("You entered:"+a); S } }...
View Full Document

This document was uploaded on 04/14/2010.

Ask a homework question - tutors are online