April 5, 2025 Menu


One of the most common exercises using Loops in Java is creating different patterns. By creating different asterisk patterns, a newbie to the corners of computer programming can easily grasp the concept of Loops.



1
2
3
4
5
6
7
8
9
10
11
12
public class PatternOne{

public static void main(String[]args){

for(int x=0; x<5; x++){
    System.out.println(" ");
        for(int z=0; z<=x; z++){
           System.out.print("*");
       }
}
}
}

Mag-post ng isang Komento

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top