hi ,
I am new to java.Can anyone what is the different between the following code for the java String Declaration.
import java.io.*;
import java.util.*;
class Sample1
{
public static void main(String args[])throws IOException
{
String str="First String";
String Str1=new String("Second String");
System.out.println("The variable is "+str);
System.out.println("The variable is "+Str1);
}
}
Thank you,
With Regards,
Prem