error

well i always get this error and i cannot fix it...in my if statements when i have the else if hting i sometimes comes up'else' without 'if' how do i fix it ?
[190 byte] By [coooooooola] at [2007-10-3 9:28:49]
# 1
Remove the semi-colon after your if statement. If that is not the case, post some code.
CaptainMorgan08a at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...
# 2

/*

*

*

* purpose: to print out a payroll

*

*

*

*/

import java.io.*;

public class payroll

{

public static void main(String [] args) throws IOException

{

BufferedReader console=new BufferedReader(new InputStreamReader(System.in));

String employee_name ;

System.out.println("Enter employee name");

employee_name=console.readLine();

String hours_worked;

System.out.println("Enter hours worked");

hours_worked=console.readLine();

String health_plan;

System.out.println("Dose " + employee_name + " have a health plan");

health_plan=console.readLine();

if(health_plan.equals(health_plan.equals("yes")||health_plan.equals("Yes")||health_plan.equals("y")||health_plan.equals("Y")));

System.out.println("yes " + employee_name + " has a health plan ");

{

else if(health_plan.equals(health_plan.equals("no")||health_plan.equals("No")||health_plan.equals("n")||health_plan.equals("N")));

System.out.println(" No " + employee_name + " dose not have a health plan "):

}

}

}

this is just the inputs and i need to fix this error so i can move on

coooooooola at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...
# 3

if(health_plan.equals(health_plan.equals("yes")||health_plan.equals("Yes")||health_plan.equals("y")||health_plan.equals("Y")));

System.out.println("yes " + employee_name + " has a health plan ");

{

else if(health_plan.equals(health_plan.equals("no")||health_plan.equals("No")||health_plan.equals("n")||health_plan.equals("N")));

System.out.println(" No " + employee_name + " dose not have a health plan "):

}

Remove the semi-colons at the end of both if statements. Put the braces around the first System.out.println().

CaptainMorgan08a at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...
# 4
umm what do u mean about putting the bracets around the first system.out.println()i tryed it and it didnt work...but i may have put them in the wrong place
coooooooola at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...
# 5

if(...)

{

//stuff

}

else if(...)

{

//other stuff

}

CaptainMorgan08a at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...
# 6
Do not put semi-colons after your "if statements"You don't need braces if there is only 1 statement following an "if" or an "else" (or loops)
C_Zhaoa at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...
# 7
> You don't need braces if there is only 1 statement> following an "if" or an "else" (or loops)Buts its still good to put them there.
CaptainMorgan08a at 2007-7-15 4:43:17 > top of Java-index,Other Topics,Algorithms...