Q. Which of the following statements regarding static methods are correct?
1. Static methods are difficult to maintain, because you can not change their implementation.
2. Static methods can be called using an object reference to an object of the class in which this method is defined.
3. Static methods are always public, because they are defined at class-level.
4. Static methods do not have direct access to non-static methods which are defined inside the same class.

  • (A) 1 and 2
  • (B) 2 and 4
  • (C) 3 and 4
  • (D) 1 and 3
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2 and 4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
123
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Sonali Mishra
Publisher
πŸ“ˆ
94%
Success Rate