D
divyatiwari123
What am I doing wrong in this program??
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
import java.util.Properties;
class PropEg
{
public static void main(String arg[])
{
Properties p;
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
String pvalue = p.getProperty("path");
System.out.println("Property path="+pname);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'm getting the following errors:
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
3 errors
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
import java.util.Properties;
class PropEg
{
public static void main(String arg[])
{
Properties p;
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
String pvalue = p.getProperty("path");
System.out.println("Property path="+pname);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'm getting the following errors:
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
PropEg.java:13: illegal escape character
p.setProperties("path,C:\Program Files\Java\jdk1.6.0\bin");
^
3 errors