Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet looping with strings
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


RishabhMehrotra
looping with strings
1 Answer(s)      3 years and 10 months ago
Posted in : JSP-Servlet


how to print this w we wel welc welco with loop?


Advertisement
View Answers

March 3, 2011 at 10:42 AM


import java.util.*;
class  StringExample3
{
    public static void main(String[] args) 
    {
        Scanner input=new Scanner(System.in);
        System.out.print("Enter word: ");
        String st=input.next();
        for(int i=0;i<=st.length();i++){
            int j=i+1;
            System.out.println(st.substring(0,i));
        }
    }
}


Related Tutorials/Questions & Answers:
looping with strings
looping with strings  how to print this w we wel welc welco with loop?   import java.util.*; class StringExample3 { public static void main(String[] args) { Scanner input=new Scanner(System.in
looping
looping   sum of the series s=1+2/1*2
Advertisements
looping ..
looping ..  can i get coding for get the following output: (using looping) 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144
strings
strings  difference between the strings in java and c
strings
strings  write a program in java to accept two strings as command line arguments and perform the following operations-: 1) compare the strings 2... is an example which accept two strings as command line arguments and perform
Flex Looping
Flex Looping  I need example for flex looping mechanisam example
Strings
will contain strings which is separated by ",". From the main method invoke
strings
strings   read sentence and convert all the word into capital case like camelcase   Hi Friend, Try the following code: import java.util.*; class ConvertWordsIntoUpperCase { public static String toCamelCase(String
looping structures in JavaScript
looping structures in JavaScript  What looping structures are there in JavaScript
shape looping
shape looping  can some1 help me?i have to make a shape using "*" by looping...and i dun know how...please and thank you * **   java diamond shape: public class Diamond{ public static void main(String[] args){ int
looping programm of sum
looping programm of sum  s=1+2/12+1+2+3/12*3+1+2+3+..... n
Flex Looping
.style1 { border-style: solid; border-width: 1px; background-color: #FFFFCC; } Executing a set of statements repeatedly is performed through looping. For this purpose, Flex provides some looping mechanism like: 1
Ask about looping in database
Ask about looping in database  Good afternoon, I want to ask... that how to read looping in field rights(if A1=false and A2 = True), use from java. i want to call rights looping with code program from java. i read from datatase
looping through a list of methods
looping through a list of methods  I have a number of methods that do the almost same thing: public void setColorRed (int colorvalue); public void setColorYellow (int colorvalue); public void setColorBlue (int colorvalue
farbonicci in looping - Spring
farbonicci in looping  how to make a program use farbonicci in looping?  import java.io.*; public class FibonciiExample{ public static void main(String[] args) throws Exception{ System.out.println("Fibonccii
Mysql Looping
Mysql Looping       Looping in Mysql is a simple loop construct, that enables the repeated execution... with Example The Tutorial illustrate an example from 'Mysql Looping'. To understand
Mysql Looping
Mysql Looping       Looping in Mysql is a simple loop construct,that enables the repeated.... Understand with Example The Tutorial illustrate an example from 'Mysql Looping
Strings in PHP
Strings in PHP  Hi, I am beginners and want to know about strings in PHP and different ways to print a string. Can someone help me in this regards?   Following tutorials will help you in details about strings in PHP
strings concatnation
strings concatnation  in string1 "123456 ABC DEF...",IN string2 "raveen". iwant to add string2 after 123456 in the first string based on index number.i need logic
strings in java
strings in java  please explain me the flow of this program..not able to execute correctly n wats the use of clone public class Strclone { public static void main(String args[]) { String s=new String("a"); String s1
strings 20june
strings 20june  please explain me the flow of this program..not able to execute correctly n wats the use of clone public class Strclone { public static void main(String args[]) { String s=new String("a"); String s1 = "Hello
 

 

 

DMCA.com