Search:

Type: Posts; User: javapenguin

Search: Search took 0.10 seconds.

  1. Replies
    7
    Views
    2,887

    Re: Method Mixup

    Also

    double taxableIncome = 50000;

    How's it supposed to know if you're referring to this variable or the parameter of that method with the same name?

    Only pass it a parameter if you want
    ...
  2. Replies
    7
    Views
    2,887

    Re: Method Mixup

    You have one too many brackets at the end of the main method. Delete one of them.

    You've inadvertantly told it to end the class there with that 3rd bracket.
  3. Replies
    7
    Views
    2,887

    Re: Method Mixup

    public class ComputeTax {
    public static void main(String[] args) {
    //Create a Scanner
    Scanner input = new Scanner(System.in);

    //Prompt the user to enter filing status...
  4. Replies
    7
    Views
    2,887

    Re: Method Mixup

    You should have your find a way to later set your taxable income to in your method to return it, otherwise taxable income will be 0.

    Also, you don't have an ending ) on your println statement in...
  5. Replies
    7
    Views
    2,887

    Re: Method Mixup

    Hmmmm....taxable income will be 0 when you call that method printTable.

    You forgot a bracket to end your main method.


    public static double printTable(int status, double taxableIncome) {...
Results 1 to 5 of 5