How to print the following pattern in java?

How to print the following pattern in java?

How to print the following pattern in java?

he he is he is going he is going in

View Answers

March 29, 2012 at 4:45 PM

import java.io.*; 
class StringPattern 
{ 
    public static void main(String[] args) throws IOException{ 

        String st="he is going in";
        String str[]=st.split(" ");

        for(byte i=0;i<str.length;i++) 
        { 
            System.out.println(); 

            for(byte j=0;j<=i;j++) 
                System.out.print(str[j]+" "); 
        } 
    }
}









Related Tutorials/Questions & Answers:
how to print the following pattern
How to print the following pattern in java?
Advertisements
how to print String as pattern ?
How to print the following output using c program
difference between java5 and java6 - Java Beginners
Print the following format
print the below pattern
Java2
print rectangle pattern in java
print array in following format
C program to print the following
print the following series
Javah
about java1
write a program in C to print following triangles on the screen
javaa swings - IDE Questions
C Program to Print Following Output - Development process
How to print this in java?
how to make this pattern???
i want print the following out put
About Java2
Pattern
Javah -  Header File Generator
ModuleNotFoundError: No module named 'javax'
ModuleNotFoundError: No module named 'javax'
pattern
Javap Tool application
how to get following output
how to get following output
how to print the server time
Maven dependency for com.gooddata - gooddata-http-client version 1.0.0+java7 is released. Learn to use gooddata-http-client version 1.0.0+java7 in Maven based Java projects
How to print this Format exactly?
How to change the cloth pattern, change the cloth pattern, cloth pattern
javas - JSP-Servlet
javab - Java Beginners
how to print the server time
How to print UIButton id
Pattern Making
how to print - Java Beginners
How to design a foot print on the sand, print on the sand, print
how to print pdf format
how to make following pyramid using loop
How to print current time in r?
print
how to print JInternal frame component ?
how to print spark dataframe data
how to print spark dataframe data
Artifacts of javax
ModuleNotFoundError: No module named 'javac-parser'
ModuleNotFoundError: No module named 'javac-parser'

Ads