Java: print field in an image of other class?
- by HH
DirectoryReader.java
public class DirectoryReader {
   public static void main(String[] args) {
      File myFile = new File(path);
      FileObject fileThing = new FileObject(myFile);
      //How to print the value of the hello-field from fileThing?
   }
}
FileObject.java
public class FileObject {
   FileObject (File fileThing) {
       String hello = "Hello Cosmos!";
   }
}