how to print
*
**
***
****
*****
in java

Recommended Answers

There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you.

DaniWeb Member Rules (which you agreed to when you signed up) …

Jump to Post

As a clue you need to use loops.

Jump to Post

All 6 Replies

There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you.

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules

Post what you have done so far and someone will help you from there.

As a clue you need to use loops.

iamthwee: are you sure? I can perfectly write that without loops.

public class awesomeStuff{
    public static void main(String[] args){
        System.out.println("*");
        System.out.println("**");
        System.out.println("***");
        System.out.println("****");
        System.out.println("*****");
    }
}

Stultuske will appreciate. =D

iamthwee: are you sure? I can perfectly write that without loops.

What is the magic you talk of... without loops!?

Slavi already demonstrated it :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.