Name: zilch 2010-05-19 5:14
How do I set a System.out.println output as an integer?
I have got this part done
System.out.print("How many children are there? "); String children = sc.nextLine();
int b = Integer.parseInt(children);
But now I want to set the output as an integer without having to enter an integer.
I have got this part done
System.out.print("How many children are there? "); String children = sc.nextLine();
int b = Integer.parseInt(children);
But now I want to set the output as an integer without having to enter an integer.