Ask Question

Which of these statements is not true about the method that follows? public void deposit (Date date, double amt) { this. balance + = amt; this. printDeposit (accountNum, date, amt); } a. printDeposit is a static method b. printDeposit is located in the same class c. balance is an instance variable d. accountNum is declared outside of the method

+4
Answers (1)
  1. 27 March, 05:40
    0
    A

    Explanation:

    A static method is a method which is common for all objects. it is shared method between different objects. we can call that method with class name.

    in the given code we are calling printDeposit () method using this. "this" keyword always represents that current object. so it is used to call instance method.

    this. printDeposit (accountNum, date, amt);

    The Answer is A
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of these statements is not true about the method that follows? public void deposit (Date date, double amt) { this. balance + = amt; ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers