More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
a. HashMap came before HashTable. b. HashMap allows null values whereas Hashtable doesn’t allow null values. c. HashTable and HashMap allow Key-Value pairs. d. Hashtable is synchronized whereas HashMap is not.
Ans. HashMap came before HashTable.
Help us improve. Please let us know the company, where you were asked this question :
Q935. Which of the following is not the use of this keyword ?
a. Passing itself to another method b. To call the static method c. Referring to the instance variable when local variable has the same name d. Calling another constructor in constructor chaining
Ans. To call the static method
Help us improve. Please let us know the company, where you were asked this question :
Q942. Which of the following is fastest to locate the DOM element ?
a. document.getElementById b. document.getElementByName c. document.ElementName.SubElementName d. They all result in similar performance in retrieving the DOM element.
Ans. document.ElementName.SubElementName
Help us improve. Please let us know the company, where you were asked this question :
Q944. Why should we have Javascript method definitions within HTML Head section ?
a. Its safe to have javascript code within head section b. Head section gets loaded even if there is any error in loading HTML page c. Head section gets executed first and hence assure that js method definition will be loaded before they are called d. So that we can have method definition and method call at the same place
Ans. Head section gets executed first and hence assure that js method definition will be loaded before they are called
Help us improve. Please let us know the company, where you were asked this question :
Q946. How can we execute a Java class independently if it doesn't have a static main method ?
a. By initiating the flow in any of the static method b. By initiating the flow in any of static block c. By initiating the flow in any other instance method named as main d. By initiating the flow in any other instance method named as main and making it final
Ans. By initiating the flow in any of static block
Help us improve. Please let us know the company, where you were asked this question :
a. try block followed by catch b. try block followed by finally c. try block followed by catch block and then finally d. try block without catch or finally block
Ans. try block without catch or finally block
Help us improve. Please let us know the company, where you were asked this question :
try block followed by catch block and then finally
try block without catch or finally block
Q957. Which of the following is not the difference between Singleton and Static class ( Class with static members only ) ?
a. Only one object can be created for Singleton class whereas No objects are created for static class. b. Singleton class instance is initiated using new keyword whereas static class instance is created using static method. c. Singleton class can be serialized whereas Static class cannot be. d. Singleton Class can participate in runtime Polymorphism whereas Static class cannot.
Ans. Singleton class instance is initiated using new keyword whereas static class instance is created using static method.
Help us improve. Please let us know the company, where you were asked this question :