How to create a String in Java

 How to create a String in Java






PROGRAM:


public class CreateAString {

    public static void main(String args[])
    {
        String s1="hi";
        String s2="hello";
        String s3="Welcome";
        System.out.println(s1+" "+s2+" "+s3);
    }
   
}


/*
hi hello Welcome

*/

Comments

Popular posts from this blog

PROGRAM TO FIND FACTORIAL OF A NUMBER USING RECURSION

PROGRAM TO FIND THE COUNT OF PARTICULAR NUMBER IN AN ARRAY

TELEPHONE BOOK USING HASHMAP