I have been trying to do the most basic thing I can think of and just read a simple line of text from the keyboard into a main program and I just can't seem to make it happen... All I want to do is what C++ does by saying ... cin >> x; Why is this so hard in JAVA.. Here is my java code..
BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
size = Integer.parseInt(strSize = dataIn.readLine());
but I get this error..
Exception in thread "main" java.lang.NumberFormatException: null
I just need to get the input from the keyboard and I can't seem to make it happen... CAN ANYONE HELP??? PLEASE?