Hi, I can't read the txt file in to my array of objects and then print out the result :   I am trying to read a file in to my array of objects from my Movie class and then print the results.



     public class Movie_Class {
  
    private int MovieID;
    private String MovieTitle;
    private String Director;
    private String Writer;
    private String Duration;
    private String Genre;
    private String Classification;
    private String ReleaseDate;
    private Double Rating;

  
  
    public Movie_18512117(int ID, String Title, String Mdirector, String  Mwriter,
     String Mduration, String Mgenre, String Mclassification, String MreleaseDate, Double  Mrating) {
   
      MovieID = ID;
     MovieTitle= Title;
     Director= Mdirector;
     Writer= Mwriter;
    Duration= Mduration;
     Genre= Mgenre;
     Classification= Mclassification;
     ReleaseDate= MreleaseDate;
     Rating= Mrating;
    
  }
   
      
    

    public int  getMovieID(){
      return MovieID;
    }
    
    public String getMovieTitle(){
      return MovieTitle;
    }
   
    
    public String getDirector(){
      return Director;
    }
    
    public String getWriter(){
      return Writer;
    }
    
    public String getDuration(){
      return Duration;
    }
    
    public String getGenre(){
      return Genre;
    }
    
    public String getClassification(){
      return Classification;
    }
    
    public String getReleaseDate(){
      return ReleaseDate;
    }
    
    public Double  getRating(){
      return Rating;
    }
    
     public void setMovieID(int MovieID) {
     this.MovieID = MovieID;
     }
      public void  setMovieTitle(String MovieTitle){
         this.MovieTitle = MovieTitle;
    }
     
      public void  setDirector(String Director) {
       this.Director = Director;
      }
      
      public void  setWriter(String Writer) {
         this. Writer =  Writer;
      }
      
      public void  setDuration(String Duration) {
        this. Duration =  Duration;
      }
      
      public void  setGenre(String Genre) {
        this.Genre = Genre;
      }
      
      public void  setClassification(String Classification){
        this.Classification = Classification;
      }
      
      public void  setReleaseDate(String ReleaseDate){
         this.ReleaseDate = ReleaseDate;
      }
      
      public void  setRating(Double Rating){
         this.Rating = Rating;
      }
      
    }

    import java.io.File;
    import java.util.Scanner;
    import java.io.FileNotFoundException;



     public class movie {



     public static void main(String[] args) throws FileNotFoundException {
    File myFile = new File ("movieLibrary.txt");
    Scanner inputFile = new Scanner(myFile);
    String str;
    Movie_Class[] movie = new Movie_Class[100];
    String[] tokens;
    
    while (inputFile.hasNext()){
     str=inputFile.next();
     tokens = str.split(",");
    for(int i = 0; i < movies.length; i++){
      
    movie[i] = new Movie_18512117(1);

> //I don't know how to read the lines in to //my array and split the spaces, then print the result.

    System.out.println(movie);
    
    
    }

    }
 
    inputFile.close();
    }
   
   
  

  
    

  
  }

> thanks i am still new to java

  