package task1; import java.util.*; class Task1 { double billpay; int x,n; double temp [] = new double [4]; double rate = 0; double test = 0; void Bill(long units) { if (usage [x] <=60) {rate =usage [x] *2.00; System.out.println("Total Customer Bills : \t" + "$" + rate+"\n\n");} if (usage [x] >=60) {rate =60*1.75 + ((usage [x] -60)*1.50); System.out.println("Total Customer Bills : \t" + "$" + rate+"\n\n");} temp [x] = rate; } } class GASBill extends Task1 { public static void main(String args[]) { long units; Scanner sc=new Scanner(System.in); System.out.println("enter number of units"); units=sc.nextLong(); GASBill b=new GASBill(); b.Bill(units); System.out.println("Bill to pay : " + b.billpay); } }
hi guys i need help with the coding it give out this error
Error: Main method not found in class task1.Task1, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
right now iam abit confusing with the coding..