Results 1 to 5 of 5
  1. #1
    surg3y3 is offline Member
    Join Date
    Jan 2010
    Posts
    4
    Rep Power
    0

    Default new to programming need help with something

    ok this is what i'm supposed to do:
    Write a program that reads a four-digit integer, such as 1998, and then displays it, one digit per line, like so:
    1
    9
    9
    8

    I don't have any idea on how to even get started on this, any help would be appreciated.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Have you studied loops and if so what kind of loops are you familiar with?

    Have you called any methods on String objects before? If not, there is one you need to get familiar with: String#charAt(). You can read about it here: String (Java Platform SE 6)

    Much luck!

  3. #3
    surg3y3 is offline Member
    Join Date
    Jan 2010
    Posts
    4
    Rep Power
    0

    Default

    I haven't studied anything that has to do with programming or java, and thanks for the link on string objects.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by surg3y3 View Post
    I haven't studied anything that has to do with programming or java, and thanks for the link on string objects.
    Hm, without your first studying some basics, I'm afraid that there's not much help we can offer you since you won't be able to understand our suggestions. I suggest you remedy this and here are some tutorials to get you started: The Really Big Index

    In particular look up for loops: http://java.sun.com/docs/books/tutor...bolts/for.html

    Good luck!

  5. #5
    surg3y3 is offline Member
    Join Date
    Jan 2010
    Posts
    4
    Rep Power
    0

Similar Threads

  1. IT 215 Java Programming
    By tlouvierre in forum New To Java
    Replies: 3
    Last Post: 04-30-2009, 04:10 AM
  2. GUI Programming Help
    By sirwiggles in forum New To Java
    Replies: 4
    Last Post: 04-28-2009, 04:53 AM
  3. New to Programming . . .Need Help
    By DSutta22 in forum New To Java
    Replies: 2
    Last Post: 09-10-2008, 05:19 AM
  4. Programming Challenges
    By gibsonrocker800 in forum Suggestions & Feedback
    Replies: 9
    Last Post: 05-12-2008, 02:06 PM
  5. programming
    By abcdefg in forum New To Java
    Replies: 9
    Last Post: 03-10-2008, 10:34 AM

Posting Permissions

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