Showing posts with label Readline in java. Show all posts
Showing posts with label Readline in java. Show all posts

Sunday, 16 December 2012

Reading Input using BufferReader and Readline classes.

import java.io.*;
public class Main
{
 public static void main(String [] args)
{
try
{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int testCount = Integer.parseInt(in.readLine());
for (int test = 0; test < testCount; test++)
{
int m,n;
String[] str = in.readLine().split("");
m = Integer.parseInt(str[0]);
n = Integer.parseInt(str[1]);
}

}
}
catch (IOException e)
{}
System.out.println("hi bhupi");
}
}