Results 1 to 1 of 1
- 04-01-2011, 10:16 PM #1
Senior Member
- Join Date
- Feb 2011
- Posts
- 235
- Rep Power
- 3
printing in external file outside of main
with the following code, how can i use the print statement in the method? it sounds like it has to be in the main because in the method, it does not accept it since you close the in and output. the only solution i could come up, was to force the program to run the method, then end after i'm finished with it.
Java Code:out.println("here is the data!"); in.close(); out.close(); } public static String line(Scanner in){
Similar Threads
-
Reading file external to jar file
By nn12 in forum New To JavaReplies: 6Last Post: 02-04-2011, 05:46 AM -
Including external file in JSP
By ulix83 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 05-10-2010, 10:31 AM -
Need help with eclipse 3.4 and external jar file
By point_Base in forum EclipseReplies: 11Last Post: 09-11-2009, 01:48 PM -
Execute external file/program
By sirwiggles in forum New To JavaReplies: 3Last Post: 04-21-2009, 11:35 PM -
Use a external file in my program
By romina in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:28 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks