FileDocCategorySizeDatePackage
Assign1a.javaAPI DocExample410Sat Sep 29 17:36:40 BST 2001None

Assign1a

public class Assign1a extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    double cost = 450.98;
    int numYears = 6;
    double totalCost; // no assignment because not yet calculated

    totalCost = cost * numYears; // note allowed assignment
    System.out.print("Total cost is ");
    System.out.println(totalCost);