Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

print * pattern in java

public class Pattern   
{   
public static void main(String args[])   
{   
    
//outer loop for rows  
for(int i=5; i>=1; i--)   
{   
//inner loop for columns  
for(int j=1; j<=i; j++)   
{   
//prints stars   
System.out.print("*");   
}   
//throws the cursor in a new line after printing each line  
System.out.println();   
}   
}   
}  


Output:
*****
****
***
**
*
Comment

PREVIOUS NEXT
Code Example
Java :: how to reverse a string in java 
Java :: Uri from bitmap java android 
Java :: java 16 raspberry pi 
Java :: java decimalformat 
Java :: kotlin string interpolation 
Java :: Calculator Program in Java. 
Java :: java add com.google.guava dependancy maven 
Java :: java how to print a string[] 
Java :: spring boot procfile run profile 
Java :: java random uuid 
Java :: how to enable cors request on springboot application 
Java :: intent in fragment android 
Java :: How to invoke sendKeys() method for Integer values using Selenium and Java 
Java :: bufferedinputstream to byte array 
Java :: java string format thousand separator 
Java :: datetimeformatter for java 
Java :: flutter remove last caracter from string 
Java :: java const 
Java :: bubble sort for java ArrayList 
Java :: java observer pattern 
Java :: hide elements android 
Java :: java arraylist print 
Java :: java map to list or array 
Java :: how to generate random id in java 
Java :: add view to relativelayout programmatically 
Java :: how to resize image in java swing 
Java :: java restart while loop 
Java :: java protected 
Java :: java catch multiple exceptions 
Java :: generatedvalue spring boot 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =