public static void main(String[] args) throws IOException {
String st3[]=new String[]{"", "", "", "sdf", "sdfsd", "sdfsd"};
System.out.println(st3[1]);
}
The second line of Netbeans displays an error message:
"non-static variable cannot be referenced from a static context".
I know the problem is declaring an array. How to declare an array STRING and quickly fill it with data?
Sorry for the stupid question and very poor english.
Thank you very much for the answers, the error has been resolved. :)
Saska source
share