I would like to write a general method readfile() to a class to use it on the subclasses to read all lines.

I have trouble with how to call methods from one class to another.

First, is it better to make void readfile() ?
or return a File? 

Secondly, which is the way to reused from other classes?

Example of my code:

```
public class Reader{

    Scanner myReader = new Scanner(myObj);
    public void readFile(){
        File myObj = new File("filename.txt");
          Scanner myReader = new Scanner(myObj);
          while (myReader.hasNextLine()) {
            String data = myReader.nextLine();
            System.out.println(data);
          }
    }

}

    public class ReadContentOfFile extends Reader{
        public List<String> parseFile{
           List<String> name = new ArrayList<>();
        //how to get lines? as I have them, from 
         another       method?
        //for example If I want to get the 
       words,separated, by comma

           return name;

        }

    }
public void Main(){
 }

```

For example for each line of a file, how I get each element.
My problem is about how to get the data for another method, for another class.