/*
*
*
* 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
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().