Created
December 6, 2015 16:03
-
-
Save jamesattard/41ea97cbf6c62838321e to your computer and use it in GitHub Desktop.
non-static method from static method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.helloworld; | |
| public class HelloWorld | |
| { | |
| public void sayHelloFromFile(){ | |
| FileResource resource = new FileResource("hello_unicode.txt"); | |
| for(String line : resource.lines()){ | |
| System.out.println(line); | |
| } | |
| } | |
| public static void main(String[] args) { | |
| HelloWorld hw = new HelloWorld(); | |
| hw.sayHelloFromFile(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment