Main loop
import java.io.*;
public class Class1 {
public static void main (String[] args){
boolean done = false ;
byte p1[] = new byte[100] ;
String p2 ;
int a ;
do {
// Get next command line
a = System.in.read(p1); // returns the number of bytes read
p2 = new String(p1,0,a); //build string from byte array
//process command line
} while (!done) ;
}
}
Previous slide
Next slide
Back to first slide
View graphic version