GunNam
Posts: 6
Nickname: gunnam
Registered: Mar, 2002
Why doesn't this print?
Posted: Mar 22, 2002 1:33 AM
Advertisement
import java.util.*;
import java.awt.*;
import java.io.*;
import java.applet.*;
public class SuperMarket {
String [] name = { "Jim" ,"John" ,"Joe" ,"Richard" ,"Paul" ,"Michael" ,"Peggy" ,"Anne" ,"Kathy" ,"Jane" ,"Chris" ,"Noah" ,"Shaina" ,"Jordan" ,"Matthew" ,"Liza" ,"Mila" ,"Dianna" ,"Jean" ,"Andi" ,"Julie" ,"Jimmy" } ;
int [] items = { 5,5,5,3,3,3,4,4,3,3,4,5,5,4,3,4,3,5,3,3,6,4} ;
double [] delay = { 100.200,50,300,20,100,150,50,240,150,100,120,350,90,200,100.200,160,300,100,50,100} ;
SuperMarket() { }
public void run(){
}
public void print(int i) {
System.out.println("\t" + name[i] + "\t" + items[i] + "\t" + delay[i]);
}
public static void main() {
int i;
SuperMarket Market = new SuperMarket();
for (i=0; i<22; i++) Market.print(i);
}
}