Ved International Discussion Board


Join the forum, it's quick and easy

Ved International Discussion Board
Ved International Discussion Board
Would you like to react to this message? Create an account in a few clicks or log in to continue.

File Input and Output To read from a file,

Go down

File Input and Output To read from a file,  Empty File Input and Output To read from a file,

Post by binusasi Sat Jul 14, 2012 11:12 am

File Input and Output
To read from a file, construct a Scanner object from a File object, like this:
Scanner in = new Scanner(new File("myfile.txt"));
If the file name contains backslashes, remember to escape each of them with an additional
backslash: "c:\\mydirectory\\myfile.txt".
binusasi
binusasi
LEADER Of ALL
LEADER Of ALL

Posts : 7988
Join date : 2011-12-07

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum