Results 1 to 4 of 4
- 08-03-2011, 08:12 AM #1
Member
- Join Date
- Aug 2011
- Posts
- 28
- Rep Power
- 0
- 08-03-2011, 08:23 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Google your friend. Otherwise, show your attempt and we will help you.
- 08-03-2011, 08:27 AM #3
Member
- Join Date
- Aug 2011
- Posts
- 28
- Rep Power
- 0
no run T_T i dont know what is wrong...import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.Scanner;
public class Sample{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int num = in.nextInt();
int n = Integer.parseInt(System.console().readLine());
String input = null;
int number = 0;
try {
BufferedReader bufferedReader = new BufferedReader (new InputStreamReader(System.in));
input = bufferedReader.readLine();
number = Integer.parseInt(input);
} catch (NumberFormatException ex) {
System.out.println("Not a number !");
} catch (IOException e) {
e.printStackTrace();
}
}
}
- 08-03-2011, 01:38 PM #4
Similar Threads
-
can i make a program to make keyboard and mouse idle or not responding for 10 second
By 3ammary in forum Advanced JavaReplies: 4Last Post: 07-23-2011, 08:08 PM -
about FileReader and BufferedReader - to read multiple files
By hasrulhussin in forum New To JavaReplies: 11Last Post: 07-19-2011, 11:39 PM -
How to make Java program run in the background?
By divs1210 in forum Advanced JavaReplies: 7Last Post: 04-16-2011, 05:30 PM -
cannot find symbol using BufferedReader.read()
By mrs_sheep in forum NetworkingReplies: 4Last Post: 04-09-2010, 07:09 PM -
how can i make bufferedreader
By chyeeqi in forum New To JavaReplies: 4Last Post: 08-21-2009, 05:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks