Results 1 to 2 of 2

Thread: Need help with java

  1. #1

    Need help with java

    hi, i just started learning java.
    My problem is making a loop. I need the user to type in how many times it should loop.
    im making a simple cashregister and the first thing i need to find out is howmany products this person bought.

    System.out.print("How many products did u buy? "):
    and then the number he enters is how many times i want this next sentence to loop.

    System.out.print("how much did this product cost? ");

    //Thanks

  2. #2
    Benevolent Dictator
    complich8's Avatar
    Join Date
    Jul 2003
    Location
    some terminal somewhere
    Age
    44
    Posts
    2,189
    Blog Entries
    1

    Need help with java

    loop control tutorial here: http://java.sun.com/docs/books...nutsandbolts/flow.html

    I suggest you start here: http://java.sun.com/docs/books/tutorial/

    Don't be afraid to use the docs and look for tutorials and examples online.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •