In order to read from file

BufferedReader bf = new BufferedReader( new FileReader
( "problem.in" ) );

Than you can read one line of input by calling:

String s = bf.readLine( );

If string has some tokens, separated by space (for example two
integers) use StringTokenizer class. For example if you want to read
two integers:

StringTokenizer st = new StringTokenizer( s );
int n = Integer.parseInt( st.nextToken( ) );
int m = Integer.parseInt( st.nextToken( ) );


Writing:

PrintWriter pw = new PrintWriter( "problem.out" );
pw.println( "Omg! It works!" );


One more peace of advice. Never use more than one question mark in a
row :o)

Skidanov Alex


On Aug 31, 5:54 pm, krrish <[email protected]> wrote:
> in java code... how to access the input .in files and do we need to
> send the entire project folder if i do the java coding in
> netbeans....??
>
> One more thing i need clarification about is... sending output file
> means... do we need to create any output file and transfer the output
> to it..??? If so can u explain me how to do that in java??
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to