Hello,
I want to transfert command line args[] to
String array:
public class Test114 {
public static void main(String args[]) {
String s[] = args[];
if (s.equals(null))
{
System.out.println("s is null");
}else
{
System.out.println("s is not equal");
}
}
}
I get this compiler error:
C:\Java\EigeneJavaProgramme>javac Test114.java
Test114.java:5: '.class' expected
String s[] = args[];
^
Test114.java:5: cannot resolve symbol
symbol : class args
location: class Test114
String s[] = args[];
^
Test114.java:5: unexpected type
required: value
found : class
String s[] = args[];
^
3 errors
Whats the mistike in line 5?
Thanks
Thomas