Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

New to java

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.

Name: Anonymous 2010-05-19 5:22

Sure you do.

Name: zilch 2010-05-19 5:25

Forget it, I got it figured out.

Name: Anonymous 2010-05-19 7:46

>>3
Ok, cool. In future please post all beginner questions to /pr/.

Name: Anonymous 2010-05-19 14:38

[using java]
Now you have 2 problems

Don't change these.
Name: Email:
Entire Thread Thread List