Pattern programs in java part 3: Learning made easy
Pattern programs in Java part 3: solved Java program for ICSE Class 9 Computer Applications with complete BlueJ code, explanation and sample output.
Pattern programs in java.
Click to learn more Patterns
Pattern 11
*
* #
*#*
*#*#
*#*#*
package Patterns;
class pattern13
{
public static void main()
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{
if(j%2!=0)
{
System.out.print("*");
}
else
{
System.out.print("#");
}
}
System.out.println();
}
}
}Pattern 12
*****
****
***
**
*
package Patterns;
class pattern11
{
public static void main()
{
for(int i=1;i<=5;i++)
{
for(int k=1;k<=(i-1);k++){
System.out.print(" ");
}
for(int j=5;j>=i;j--)
{
System.out.print("*");
}
System.out.println();
}
}
}Pattern 13
54321
4321
321
21
1
package Patterns;
class pattern15
{
public static void main()
{
for(int i=5;i>=1;i--)
{
int k=i;
for(int j=1;j<=i;j++)
{
System.out.print(k);
k--;
}
System.out.println();
}
}
}Watch java videos
Related Posts
Continue learning with these related articles

User-Defined Methods in Java for ICSE Class 10: Parameters, Return and Overloading
ICSE Class 10 Computer Applications notes on user-defined methods: method prototype and signature, formal and actual parameters, return types, call by value vs call by reference, pure and impure methods, static methods and method overloading, with programs.

String Methods in Java for ICSE Class 10: 25 Output Questions with Answers
ICSE Class 10 Computer Applications practice on String class methods: length, charAt, indexOf, lastIndexOf, substring, replace, trim, compareTo, equals and more, with 25 board-style output questions and step-by-step answers.

Special Number Programs in Java for ICSE: Armstrong, Spy, Neon, Disarium, Pronic and More
Every special number asked in ICSE Computer Applications – prime, perfect, Armstrong, palindrome, automorphic, neon, spy, Niven, duck, buzz, Disarium, special and pronic numbers – with definitions, examples and one complete Java program that checks them all.