
Write a Java program to display a pattern?

String str = "";
int count = 4;
for( int i=9,j =0; i>=0;i--){
if(j== count){
str =str+" "+i;
count --;
j = 0;
}else {
str= str+i;
}
j++;
}
System.out.print(str);

class Display
{
public void manipulate(int N)
{
int count=N;
int split=N/2;
while(count>-1)
{
for(int i=0;i

public void manipulate(int N)
{
int count=N;
int split=N/2;
while(count>-1)
{
for(int i=0;i
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.