1.

Which of the below is false about java coding?(a) variable names should be short(b) variable names should be such that they avoid ambiguity(c) test case method names should be created as english sentences without spaces(d) class constants should be used when we want to share data between class methodsI have been asked this question during an internship interview.I'm obligated to ask this question of Coding best practices topic in portion Autoboxing & Miscellaneous of Java

Answer»

Right answer is (a) variable names should be short

To explain I would say: variable names LIKE i, a, abc, etc should be avoided. They should be real world names which AVOID ambiguity. TEST case name should explain its significance.



Discussion

No Comment Found

Related InterviewSolutions