Code:
public class Array {
public static void main (String[] args)
{
String [] sign = new String[]{"Fire", "Earth", "water"};
System.out.print(sign.length);
}
}
public class Array {
public static void main (String[] args)
{
String [] sign = new String[]{"Fire", "Earth", "water"};
System.out.print(sign.length);
}
}
emp.weeklyPay(hWorked, hourlyPay);
//Monthly salary is calculated by multiplying weeklyPay with 4
public void monthlyPay(double weeklyPay)
{
salary = weeklyPay * 4;
}
public class Employee{
String name;
double salary;
// This is the constructor of the class Employee
public Employee(String EmpName)
{
name = EmpName;
}
// Calculate weekly pay
public double weeklyPay(double hrsWorked, double hlyPay)
{
double total;
if (hrsWorked <= 40)
total
public class Temperature
{
private String myScale; //valid values are "F" or "C"
private double myDegrees;
double celsius;
//default constructor
public Temperature()
{
myScale = "";
myDegrees = 0.0;
}
//constructor with specified degrees
Leave a comment: