Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Help with a very beginner java program creation

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with a very beginner java program creation

    This is the demand:

    Write a program that asks the user for a positive integer no greater than 15. 'Hie program
    should then display a square on the screen using the character 'X*. The number entered by
    the user will be the length of each side of the square. For example, if the user enters 5, the
    program should display the following:
    xxxxx
    xxxxx
    xxxxx
    xxxxx
    xxxxx
    If the user enters 8, the program should display the following:
    xxxxxxxx
    xxxxxxxx
    xxxxxxxx
    xxxxxxxx
    xxxxxxxx
    xxxxxxxx
    xxxxxxxx
    xxxxxxxx

    Not quite sure where to begin. This is an exercise problem from starting out with java by tony gaddis 5e. Page 270 #18


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Help with a very beginner java program creation

    Looks like the program should use some loops.
    What have you tried?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Sep 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Help with a very beginner java program creation

    I know that it has to use nested loops that's for sure. Keep in mind that my teacher doesn't teach very well and hardly anyone in the class knows much.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Help with a very beginner java program creation

    Have you made a list of the steps the code needs to do to solve the problem?
    You'll need that before trying to write any code.

    Also take a look at the tutorial about loops:
    The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)
    The while and do-while Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Beginner Java program help
    By bbmaster123 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: September 27th, 2014, 04:03 PM
  2. beginner java program help
    By Peeboelmeebo in forum Object Oriented Programming
    Replies: 5
    Last Post: February 13th, 2013, 08:24 PM
  3. Beginner,first java program assignment
    By geezlouise in forum What's Wrong With My Code?
    Replies: 7
    Last Post: January 31st, 2013, 08:36 PM
  4. need help in program creation
    By vinaysa86 in forum Loops & Control Statements
    Replies: 4
    Last Post: August 15th, 2012, 07:11 PM
  5. Java program (beginner) help?!
    By rk2010 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: April 10th, 2012, 12:30 PM

Tags for this Thread