I am trying to run this simple code in Netbeans and somehow keep getting an 'else without if' error.
I ran this in Eclips as well and there I get the remark that else should be converted into a while which confuses me even more. I already did some examples like this and they worked.
I also left out the semi colon at the end of the if statement but it didn't work.
public static void main(String[] args) {
int a = 4;
int b = 5;
boolean negative = false;
if (negative && (a < 0 && b < 0));
{
System.out.println("true");
}
else((a < 0 && b > 0) || (a > 0 && b < 0));
{
System.out.println("false");
}