4 Replies Latest reply: Oct 21, 2008 12:39 PM by 843785 RSS

    warning: required java.util.ArrayList<java.lang.String>

      i'm having this little problem.

      when i build the programm i get this warning:

      found   : java.lang.Object
      required: java.util.ArrayList<java.lang.String>
      ArrayList<String> array = (ArrayList<String>) in.readObject();
      +1 warning+

      my code:
      FileInputStream fis = new FileInputStream(filename);
      ObjectInputStream in = new ObjectInputStream(fis);
      ArrayList<String> array = (ArrayList<String>) in.readObject();
      the Object i'm reading is an arraylist. i save arraylists with a savemethod to files and then read the files with the loadmethod (what i posted) again.

      any idea how i could fix the problem?
      would be thankful for any suggestions!!