Sunday, March 18, 2018

String Operation of Java Programme

/* Example of String Operation */
package StringOperation;
public class StringOperation
{
    static public void main(String[] args)
    {
        String S1 , S2;
        S1 = new String("I Love ");
        S2 = new String("Java Programming");
        pr(S1);
        prln(S2);
    }
    static void prln(Object anyObject)
    {
        System.out.println(anyObject);
    }
    static void pr(Object anyObject)
    {
        System.out.print(anyObject);
    }
   
}



Share:

0 comments:

Post a Comment

Blogger templates