How to create a String using new Keyword
How to create a String using new Keyword
PROGRAM:
public class CreatingStringUsingNew {
public static void main(String args[])
{
String s1="Hello";
String s2=new String("Java");
System.out.println(s2);
}
}
Comments
Post a Comment