Question: Discuss the Java guideline Consistency in depth use 1 page for your discussion. It is OK to use code to help demonstrate your points .
Discuss the Java guideline "Consistency" in depth use 1 page for your discussion. It is OK to use code to help demonstrate your points
. Consistency [] Follow standard Java programming style and naming conventions. Choose informative names for classes, data fields, and methods. A popular style is to place the data declaration before the constructor and place constructors before methods. [] Make the names consistent. It is not a good practice to choose different names for similar operations. [] In general, you should consistently provide a public no-arg constructor for constructing a default instance. If a class does not support a no-arg constructor, document the reason. If no constructors are defined explicitly, a public default no-arg constructor with an empty body is assumed. [] If you want to prevent users from creating an object for a class, you can declare a private constructor in the class, as is the case for the Math class.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
