Classe%20di%20prova - PowerPoint PPT Presentation

About This Presentation
Title:

Classe%20di%20prova

Description:

1. Classe di prova. import java.io.IOException; import java.io.FileReader; ... throws IOException // Verifica argomenti su riga di comando. if(args.length 1) ... – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 3
Provided by: Gru2
Category:

less

Transcript and Presenter's Notes

Title: Classe%20di%20prova


1
Classe di prova
import java.io.IOException import
java.io.FileReader import java.util.Scanner pub
lic class MainCO public static void
main(String args) throws IOException
// Verifica argomenti su riga di comando
if(args.length lt 1)
System.out.println( "uso javaMain
nomeFile") return
2
Classe di prova
// lettura file Scanner in new
Scanner( new FileReader(args0) CO
storeCO new CO() while (in.hasNextLine())
Scanner tok new Scanner(in.nextLine(
)) while (tok.hasNext())
storeCO.accoda(tok.next())
tok.close() in.close()
Write a Comment
User Comments (0)
About PowerShow.com