To create directory on the HD we use mkDir() method:
This method returns true if the directory is created on HD
This method returns false if the directory is already existing on HD
Which of these class have only one field 'TYPE' ?
The Void class has one field, TYPE, which holds a reference to the Class object for the type void.
What is the string contained in s after following lines of code?
StringBuffer s = new StringBuffer(“Hello”); s.deleteCharAt(0); ?
deleteCharAt() method deletes the character at the specified index location and returns the resulting StringBuffer object.
So after deleting the character at 0 ie 'H', the string returns 'ello' as the output.
Which of the following are incorrect form of StringBuffer class constructor ?
Does not overriding hashcode() method has any performance implication ?
A poor Hashcode() function will result in frequent collision in HashMap which eventually increase time for adding an object into Hash Map.
How do you handle error condition while writing stored procedure or accessing stored procedure from java ?
Stored procedure should return error code if some operation fails but if stored procedure itself fail than catching SQLException is only choice.
We'll send you weekly updates from Sawaal
Copyright © 2016 Sawaal.com | All Rights Reserved