Java Basic
- In which file database table configuration is stored?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Database table configuration is stored in .hbm file.
- Which of the following is not an advantage of Hibernate Criteria API?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
addOrder() can be used for ordering the results.
- What should the return type of method where there is no return value?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Returning Empty collection is a good practice. It eliminates chances of unhandled null pointer exceptions.
- What data structure should be used when number of elements is fixed?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Array list has variable size. Array is stored in contiguous memory. Hence, reading is faster. Also, array is memory efficient.
- Which of the below is true about java class structure?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Class name should always start with upper case and contain those attribute and functionality which it should (Single Responsibility Principle); hence keeping it short. The attributes should be usually private with get and set methods.