I have the following code-
if (aa[0].equals("add")) {
if (aa[1].equals("s")&aa[3].equals("s")) {
A= Double.parseDouble (UISAVE[Integer.parseInt(aa[2])]);
B= Double.parseDouble (UISAVE[Integer.parseInt(aa[4])]);
}
if (aa[1].equals("s")&!aa[3].equals("s")) {
A= Double.parseDouble (UISAVE[Integer.parseInt(aa[2])]);
if (aa[3].equals(null)) {
aa[3]="0";
}
B= Double.parseDouble (aa[3]);
}
if (!aa[1].equals("s")) {
A= Double.parseDouble (aa[2]);
B= Double.parseDouble (aa[3]);
}
out[count]=Double.toString(A+B);
read(in, out, UISAVE);
}
and I get this error -
Exception in thread "main" java.lang.NullPointerException at CMDL.shizzle.april2014.Write.read(Write.java:25)
Now, as it says the error is apparently an if statement... if (aa[1].equals("s"(&aa[3].equals("s")) { and I've tried most of what I can do and haven't found a solution yet.
Thanks if you can help.