Math Class

Generate Random Int Within Given Range Example

Submitted By: Justin G.

Want to learn quickly?
Try one of the many quizzes. More than Java 400 questions with detailed answers.

Add Comment

  • public class Account
    {
    private double balance; //instance varible

    public Account (double initialBalance)
    {

    if(initialBalance>0.0)
    balance = initialBalance;
    }

    public void credit (double amount)
    {
    balance = balance + amount;
    }
    public double getBalance()
    {
    return balance;
    }
    }

Sponsors

Facebook Fans