It is possible to re-load an object and all its collections at any time, using the xxxx() method. This is useful when database triggers are used to initialize some of the properties of the object.What is the xxxx() method ?
a) refresh();
b) flush();
c) fetch();
d) load()
What does the following SQL script do? SELECT AVG(MAX(salary)) FROM employees GROUP BY department_id;
it has a syntax error, the AVG clause is not valid
it calculates the average of the maximum salaries of all the departments
it has a syntax error, the MAX clause is not valid
it has no error, but the GROUP BY clause is not effective
What is the root level element in a hibernate mapping file?
a)
b)
c)
d) None
Which are DML statements? (Choose all that apply)
COMMIT
MERGE
UPDATE
DELETE
CREATE
DROP
Which is simplest and correct code snippet needs to be put in the main function to replace the value object of the HashMap for the key “orange”?
itemMap.remove("orange"); itemMap.put("orange", new Item("Orange") );
((Item)itemMap.get(“orange”)).name = “Orange”;
itemMap.put("orange", new Item("Orange") );
None of above
Which is the most performance efficient implementation for assignCode method from the given options?
code attribute cannot be changed as Item class doesn’t have setter method for it.
for (int i = 0; i < itemList.size(); i++) { if(itemList.get(i) != null) { ((Item)itemList.get(i)).code = 50+i; } }
int i = 0; Item im = null; while (i < itemList.size()) { im = (Item)itemList.get(i); if(im != null) { im.code = 50+i; } i++; }
int i = 0; Item im = null; Iterator itr = itemList.iterator(); while (itr.hasNext()) { im =(Item) itr.next(); im.code = 50+i; i++; }
Which of the given options code is correct and will not waste memory.
Item im = new Item(null); im = (Item ) itemList.get(0);
Item im = new Item(“Done”); im = (Item ) itemList.get(0);
Item im = null; im = (Item ) itemList.get(0);
All of the above.
Which code in the given options if put in below Main class will not print “Done”?
Function call:- changeName(im); Function implementation :- { im.name = "Done"; return null; }
Function call:- changeName(im); Function implementation :- { im = new Item("Done"); return null; }
Function call :- im = changeName(im); function implementation :- { Item otherObject = new Item("Done"); return otherObject; }
All of the above
Which Function can return a non-Null value if passed null arguments?
NULLIF
LENGTH
CONCAT
INSTR
TAN
In what scenario the sequence field contains the value of 'E' in Sort utility?
user modified field to be sort ascending
No specific order specified
Jumbled order
None of the above