Hey ,, i am programming student. I need some urget help from you all for one of my project.
Ineed to know how to clean up Java Codes. Could you guys help me out please ? Its urgent
Hey ,, i am programming student. I need some urget help from you all for one of my project.
Ineed to know how to clean up Java Codes. Could you guys help me out please ? Its urgent
Well, here are the steps to clean Java Codes:-
1. Bring up the sample of code that you wish to clean.
2. Read the code. Keep a pair of reading glasses handy, because you’re going to be squinting at the screen for hours and hours.
3. Check the classes and categories used in the code sample. Java publishes a standard system of names in order to keep the code consistent no matter who is writing it.
4. Watch your syntax. Java has a certain syntax, or order of its elements, that helps determine what a given command or sequence of code does. Correct any deficiencies that you find.
5. Evaluate the logical statements of the code. This is the nasty part. Run through each logical unit and check for internal consistency.
6. Eliminate unnecessary spaces. Each logical unit of code is supposed to be separated by spaces. Get rid of space that doesn’t need to be there.
7. Cross your fingers and test. Most likely outcome: you need to go back through the code and try again.
Thats it...
You can try this:-
- In Eclipse, there is a nice feature to clean up Java code. First, you can change the Clean Up profile (Window – Preferences) and define, how you want the code should look like.
- There are interesting clean ups like “Remove unnecessary casts” or to add missing Annotations like “@Override”.
- After creating your profile, simply right click to the project and choose Source – Clean up.
Carefully consider what changing one bit of the code will do to the rest of the code sample. Serious problems can result if you do not work out the consequences of changing a sequence of code before you do it.
Bookmarks