Results 1 to 3 of 3
  1. #1
    toby is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default Calculate Tax in java

    Hi, I need to calculate 15% as a method.
    Thanks

  2. #2
    Seemster is offline Member
    Join Date
    Jul 2007
    Posts
    55
    Rep Power
    0

    Default

    private double taxRate = .15;
    public double calcTax(double amount) {
    return amount * taxRate;
    }

  3. #3
    Swamipsn is offline Member
    Join Date
    Jul 2007
    Posts
    74
    Rep Power
    0

    Default

    private float tx;
    tx = (15/100);
    public float cal(float amt)
    {
    return amt*tx;
    }

Similar Threads

  1. Calculate Average
    By sthack99 in forum New To Java
    Replies: 4
    Last Post: 06-13-2008, 11:09 AM
  2. Calculate what e1 and e2 should be
    By Legoland in forum New To Java
    Replies: 11
    Last Post: 07-02-2007, 06:01 PM
  3. Calculate average age for women and men?
    By Legoland in forum New To Java
    Replies: 3
    Last Post: 04-18-2007, 10:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •