ok so I am working this project where you have to do something with inputs from user
let says if he enters
"12 3"
But he doesn't input the second input
And let's say if i call it with
String something = in.readLine();
if i were to call
String nextLine = in.readLine();
i get errors. how do i check if there's no second input?
public static void main(String [] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //ctr + shift + o
String eachLine = in.readLine(); //ex. "12 5"" or "AB 12"
String nextLine = in.readLine();
if the user input
"3 2" <<
but does not enter the second one..i get nullpointerexception