Check04B - " Stock s = new Stock(input.nextLine S Date d = new Date D output.printf"As of%s the price of a%n" d.toString

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

View Full Document Right Arrow Icon
import java.util.Scanner; import java.util.Date; import; import type.lib.Stock; i public class Check04B { public static void main(String[] args) { PrintStream output = System.out; Scanner input = new Scanner(; S output.print("Enter a stock symbol .
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: .. "); Stock s = new Stock(input.nextLine()); S Date d = new Date(); D output.printf("As of %s, the price of a%n", d.toString()); output.println(s.getName()); output.printf("share is: %.2f%n", s.getPrice()); } }...
View Full Document

This note was uploaded on 09/16/2011 for the course CSE CSE 1020 taught by Professor Burton,ma during the Fall '10 term at York University.

Ask a homework question - tutors are online