Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

lol help

Name: Anonymous 2008-03-15 20:39

Noob programmer here, I can't figure out why I keep getting the error "Cannot find symbol class ArrayList".


import java.awt.*;
import javax.swing.*;
import java.util.Scanner;

public class MyArray{  
  


     public static void main()     {
        int i=0, thesame, size;         
      
        ArrayList<String> list = new ArrayList<String>();
         Scanner input = new Scanner(System.in);
         bString = "done";
         for(i=0;i!=2.5;i++){
              System.out.print("Enter a name");
              nextWord = input.nextString;
              list.add(i, nextWord);
              boolean theSame = bString.equals("Done");
              if(theSame = 0)
                  i = 1.5;
         }   
          int size = list.size();
          for(i=0;i<=0;i++){
              String temp = copy.get(i);
              System.out.print(temp);
            }  
               
               
    }
    public ArrayList sort(ArrayList list){
      
        int top, i, maxIdx, copy1;
       
       
        ArrayList<Sring> copy = new ArrayList<String>(list.size());
       
    for (int i = 0;i < list.size;i++)
        copy.add((string)list.get(i));
    for (int top=copy.size-1;top > 0;top--) {
        ArrayList maximum = ((string)copy.get(0));
        int maxIdx = 0;

        for (int search=1;search <= top;search++){
            String name = ((string)copy.get(search)) ;
            String topName = ((string)copy.get(top)) ;
          
            if (name.compareTo(top) = 1) {
                 Sting maximum = ((string)copy.get(search));
                 maxIdx = search;
            }
        }
        if (maxIdx != top) {
        ArrayList swap = ((string)copy.get(top));
        copy1= ((string)copy.get(maxIdx));
        copy.set(top,copy1);
        copy.set(maxIdx,swap);
       }
     }
    return copy;


}
}

Name: Anonymous 2008-03-16 21:04

/prog/ has been dead for a while now, seriously, its a programming board, the place where the cancer killing society(i.e. socially retarded fatasses who contribute little to the world) can gather and feel the illusion of being elite some how, yes op the comp sci industry is a joke at the moment and probably for a LONG time, you will get an entry level programming job and go nowhere, i suggest if you are good with the math just major in math and go into high level finances, work for big coorperations or something, if you are indeed good at math and have reasonable social skills you can pull it off, steer clear the of comp sci for now though, take it as an elective if you want, i dont think you suck at programming, i mean ya you do, but everyone does when they start

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List