Ask Question

Which of the following is not true about designing classes? In order for class information to be printed instead of a memory address, a toString method should be declared. The constructor must be declared as public. All class variables should be declared as private. To test for equality the programmer should define an equals method. All methods should be declared private.

+5
Answers (1)
  1. 30 June, 15:40
    0
    ' All methods should be declared private ' is not true for classes. One should be able to change the properties of objects, and to do this safely and in a controlled manner, some public methods are declared. Some private methods can also be declared for more potentially sensitive operations for being called from within the class.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of the following is not true about designing classes? In order for class information to be printed instead of a memory address, a ...” 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