By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,491 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,491 IT Pros & Developers. It's quick & easy.

There is no error but it came out could not find or load main class Employees

P: 1
import java.util.Scanner;

import javax.swing.JOptionPane;

public class Employee{



public static void main (String[]args) {
@SuppressWarnings("resource")
Scanner input = new Scanner(System.in);
System.out.println("Employees Full Name:");
String FullName = input.nextLine();
System.out.println("Employees Full Name:"+ FullName);
System.out.println("Hours of worked in a week:");
int HW = input.nextInt();
System.out.println("Hourly Pay Rate:");
double hPayr = input.nextDouble();
int GTaxR = input.nextInt();
int ETaxR = input.nextInt();

JOptionPane.showMessageDialog(null, FullName);
System.out.println("Employees Full Name:"+ FullName);

double GrossPay = hPayr * HW;
System.out.println("Gross Pay:"+ "$" + GrossPay);
System.out.println("Deductions:");
double GTax = GTaxR * GrossPay;
System.out.println("Government Tax: "+ GTax);
double ETax = ETaxR * GrossPay;
System.out.println("Employment Tax: "+ ETax);
double TDeduction = GTax + ETax;
System.out.println("Total Deductions: "+ "$"+ TDeduction);
double NetPay = GrossPay * TDeduction;
System.out.println("Net Pay: "+ "$"+ NetPay);

}
}
1 Week Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.