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
Java2
Print the following format
print the below pattern
print rectangle pattern in java
print array in following format
C program to print the following
print the following series
Javah
about java1
javaa swings - IDE Questions
how to make this pattern???
How to print this in java?
write a program in C to print following triangles on the screen
C Program to Print Following Output - Development process
i want print the following out put
ModuleNotFoundError: No module named 'javax'
ModuleNotFoundError: No module named 'javax'
About Java2
Javah -  Header File Generator
Pattern
how to get following output
how to get following output
Javap Tool application
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 the server time
pattern
How to print this Format exactly?
how to print the server time
How to change the cloth pattern, change the cloth pattern, cloth pattern
How to print UIButton id
javas - JSP-Servlet
javab - Java Beginners
how to print - Java Beginners
Artifacts of javax
how to print pdf format
Pattern Making
How to design a foot print on the sand, print on the sand, print
How to print current time in r?
how to make following pyramid using loop
how to print JInternal frame component ?
how to print spark dataframe data
how to print spark dataframe data
How to print like printf in python
How can print integer in method
ModuleNotFoundError: No module named 'javac-parser'

Ads