Practical No. 11 and 12: Develop program for implementation of different functions of String class

1) Write a program to show the use of all methods of String Class.
 Click Here

2) State Output
class String_demo
{
public static void main( String args[] )
{
char chars[] = {'a','b','c'};
String s = new String(chars);
System.out.println(s);
  }

}

Output:


2) State the output

class Output
{
public static void main( String args[] )
{
String s1 = "Hello I love Java";
String s2 = new String(s1);

System.out.println((s1==s2)+" "+s1.equals(s2) );
}

}

Output:.



3) Program to implement all StringBuffer class method.
 Click Here

Previous
Next Post »