Created
April 21, 2016 22:19
-
-
Save sjsakib/941505de35f777d05fb5294eebaf7f10 to your computer and use it in GitHub Desktop.
This file contains 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
import java.util.*; | |
import java.io.*; | |
public class InputWithFile { | |
public static void main(String[] args) throws Exception { | |
System.setIn(new FileInputStream(new File("in"))); | |
Scanner in = new Scanner(System.in); | |
System.out.println(in.next()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment