


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



(^) Ensure the code follows standard naming conventions Class names should start with Capitals: Employee, Student, (^) Make sure it handles constants efficiently Constants help improve memory as they are cached by the JVM. For values that are reused across multiple places, create a constant file that holds static values. (^) Check for proper clean Up It is common during development to use procedures that help with your coding and debugging (hard coded variables, for example). It is good practice to remove these items and others such as:
(^) Handle strings appropriately If you need to perform a lot of operations on a String, use StringBuilder or StringBuffer. Strings are immutable, whereas StringBuilder and StringBuffer are mutable and can be changed. Additionally, a new String object is created for every concatenation operation. Rather than creating multiple items, using a mutable object is preferred. (^) Optimize to use switch-case over multiple If-Else statements Rather than using multiple if-else conditions, use the cleaner and more readable switch-case. Doing so makes the logic cleaner and optimizes the app's performance. (^) Avoid unnecessary comments in code? Comments should not be used to explain code. If the logic is not intuitive, it should be rewritten.