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 5 of 5

Thread: Pattern printing in Java

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Location
    West Bengal, India
    Posts
    29
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Pattern printing in Java

    i want to get following out for a java program... how i should start my study?


    output of the program:

    How many stars you want to print in 1st row ? 7

    *******
    ******
    *****
    ****
    *****
    ******
    *******


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Pattern printing in Java

    Start here: The Java™ Tutorials and search the forums (for example search for "asterisk triangle") - questions such as this have been addressed quite often.

    Edit:
    This thread has been cross posted here:

    http://www.java-forums.org/new-java/40313-pattern-printing-java.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting

    See http://www.javaprogrammingforums.com...s-posting.html

    Last edited by copeg; March 10th, 2011 at 10:29 AM.

  3. #3
    Junior Member
    Join Date
    Mar 2011
    Location
    West Bengal, India
    Posts
    29
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: Pattern printing in Java

    is there any help from anybody?

  4. #4
    Junior Member
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Pattern printing in Java

    Edited by moderator...

    This should give you the desired output..........
    Last edited by copeg; July 1st, 2011 at 04:06 PM. Reason: Spoonfeed answer

  5. #5
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Pattern printing in Java

    nasim_khan, while we appreciate your contribution, we ask that you please do not hand over answers like that. I recommend you read the following (namely section 7)
    Announcements - Loops & Control Statements
    and
    http://www.javaprogrammingforums.com...n-feeding.html

Similar Threads

  1. Triangle Printing - Java Program
    By mparthiban in forum Java Programming Tutorials
    Replies: 1
    Last Post: January 5th, 2012, 10:00 AM
  2. printing in java; missing spaces
    By user85116 in forum AWT / Java Swing
    Replies: 1
    Last Post: October 26th, 2010, 02:51 PM
  3. [SOLVED] Printing Data in JAVA
    By aussiemcgr in forum Java Theory & Questions
    Replies: 1
    Last Post: October 15th, 2010, 01:22 PM
  4. Urgent need a java regex pattern
    By mallikarjun_sg in forum Java Theory & Questions
    Replies: 1
    Last Post: May 6th, 2010, 05:51 AM
  5. [SOLVED] Printing Array without printing empty elements
    By CarlMartin10 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 12th, 2010, 02:41 AM

Tags for this Thread