Naming conventions MCQs contains rules for writing naming styles for Fields, Methods, Classes, Interfaces, Packages and Constants
A. A rule for writing names of methods only
B. A rule for writing names of classes only
C. A rule for writing names of identifiers
View Answer
A. true
B. false
View Answer
A. true
B. false
View Answer
A. It should start with the uppercase letter.
B. It should be a noun such as Student, School, Book
C. Use appropriate words, instead of acronyms.
D. All of above
View Answer
A. It should start with the uppercase letter.
B. It should be an adjective such as Intelligent, Acceptable
C. Use appropriate words, instead of acronyms.
D. All of above
View Answer
A. It should start with lowercase letter.
B. It should be a verb such as show(), count(), describe()
C. If name contains many words then first word's letter start with lowercase only and other words will start with uppercase
D. All of above
View Answer
A. It should start with a lowercase letter such as id, name
B. It should not start with the special characters, And Avoid using one-character variables such as x, y, z.
C. If name have multiple names then start it with the lowercase letter followed by an uppercase letter such as firstName, lastName.
D. All of Above
View Answer
A. It should be a lowercase letter such as java, lang
B. If the name contains multiple words, it should be separated by dots (.) such as java.util, java.lang
C. All of above
View Answer
A. It should be in uppercase letters such as DAY, MONTH
B. If the name contains multiple words, it should be separated by an underscore(_) such as FINAL_DATE.
C. It may contain digits but not as the first letter
D. All of above
View Answer
A. class EmployeeSalary
B. class employeeSalary
C. class Employee_Salary
D. All of above
View Answer