Basic Calculation in JAVA
class BasicCalculationInJava
{
public void ExampleTest()
{
long hoursWorked =50;
double payRate=40.0, taxRate =0.10;
System.out.println("Hours Worked :" + hoursWorked);
System.out.println("Payment Amount:"+(hoursWorked*payRate));
System.out.println("Tax Payable:"+(hoursWorked*payRate*taxRate));
}
}
No comments:
Post a Comment