call method from main class, gives error
- by user557039
try to call method ss from class from it return me error,
Blockquote
Exception in thread "main" java.lang.NullPointerException
at teste1.exp.ss(exp.java:16)
at teste1.Main.main(Main.java:64)
Java Result: 1
Blockquote
<pre>
public class Main {
public static void main(String[] arguments) {
...................
private static String[] ff;
exp mega = new exp();
mega.ss(ff);
}
class exp {
public void ss (String gvanswer[]){
String answer[] = new String[3];
answer[0] = "pacific ";
answer[1] = "everest";
answer[2] = "amazon ";
if (gvnswer[0].equals("pacific"))
{System.out.println("eeeeeeeeeeeeee ");}
if (gvanswer[1].equals(answer[1])){System.out.println("l ");}
}