Write a program to calculate electricity bill in java

Write a program to calculate electricity bill in java. Multiply the wattage of the gadget by the number of hours it is used per day. Multiply by 1000. Subtract your kWh rate from the total.

class Main
{
public static void main(String args[])
{
int unit=500;
double bill=0;
if(unit<100)
{
bill=unit*1.20;
}
else if(unit<300)
{
bill=100*1.20+(unit-100)*2;
}
else if(unit>300)
{
bill=100*1.20+200*2+(unit-300)*3;
}
System.out.println("Electric bill calculator" + bill);
}
}

Electric bill calculator1120.0