import javax.swing.JOptionPane;
import java.util.Scanner;
public class pay{
static Scanner sc;
public static void main (String[]args)
{
double Regpay = 8;
double OThour = Regpay * 1.5;
double hours = 0;
double gpay = Regpay * hours;
double Totalpay = OThour + gpay;
Scanner input = new Scanner(System.in);
System.out.println("Normal pay for hours worked less than 40hrs will be, £8.00 per hour");
System.out.println("If workers work more than 40hrs, their pay will be time and a half");
System.out.println("please enter your name");
String name = sc.nextLine();
System.out.println("How many hours did you work this month");
hours = sc.nextDouble();
System.out.println("How many hours overtime did you work");
OThour = sc.nextDouble();
if (hours<=40){
Totalpay = gpay;
System.out.print("You are not entitled to overtime pay");
}else{
if (hours>=41)
Totalpay = gpay + OThour >=1;
}
}
}
I am getting the error on the line Totalpay = gpay + OThour >=1;
I don't know what to do, I keep trying to change things around but I keep getting the same error!!!!