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
Java2
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
How to print this in java?
how to make this pattern???
write a program in C to print following triangles on the screen
javaa swings - IDE Questions
C Program to Print Following Output - Development process
i want print the following out put
About Java2
ModuleNotFoundError: No module named 'javax'
ModuleNotFoundError: No module named 'javax'
Pattern
Javah -  Header File Generator
how to get following output
how to get following output
how to print the server time
pattern
How to print this Format exactly?
Javap Tool application
how to print the server time
How to change the cloth pattern, change the cloth pattern, cloth pattern
How to print UIButton id
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 - Java Beginners
javas - JSP-Servlet
javab - Java Beginners
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
how to print dot in python without newline
how to print dot in python without newline

Ads