Ask Question
29 July, 07:17

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.

+2
Answers (1)
  1. 29 July, 09:37
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers