On Java | More Q&A Click Here
# | Question | Options | Answer |
---|---|---|---|
301 | Which of these are legacy classes? | All of the mentioned | |
302 | Which of these is the interface of legacy? | Enumeration | |
303 | What is the name of a data member of class Vector which is used to store a number of elements in the vector? | elementCount | |
304 | Which of these methods is used to add elements in vector at specific location? | addElement() | |
305 | Which of these class object has an architecture similar to that of array? | Bitset | |
306 | Which of these method is used to make a bit zero specified by the index? | clear() | |
307 | Which of these method is used to calculate number of bits required to hold the BitSet object? | length() | |
308 | Which of these packages contain all the collection classes? | java.util | |
309 | Which of these classes is not part of Java’s collection framework? | Maps | |
310 | Which of this interface is not a part of Java’s collection framework? | SortedList | |
311 | Which of these methods deletes all the elements from invoking collection? | clear() | |
312 | What is Collection in Java? | A group of objects | |
313 | Which of these return type of hasNext() method of an iterator? | Boolean | |
314 | Which of these methods is used to obtain an iterator to the start of collection? | iterator() | |
315 | Which of these methods can be used to move to next element in a collection? | next() | |
316 | Which of these iterators can be used only with List? | ListIterator | |
317 | Which of these is a method of ListIterator used to obtain index of previous element? | previousIndex() | |
318 | Which of these exceptions is thrown by remover() method? | IllegalStateException | |
319 | When does Exceptions in Java arises in code sequence? | Run Time | |
320 | Which of these keywords is not a part of exception handling? | thrown | |
321 | Which of these keywords must be used to monitor for exceptions? | try | |
322 | Which of these keywords must be used to handle the exception thrown by try block in some rational manner? | catch | |
323 | Which of these keywords is used to manually throw an exception? | throw | |
324 | Which of the following keywords is used for throwing exception manually? | throw | |
325 | Which of the following classes can catch all exceptions which cannot be caught? | Error | |
326 | Which of the following is a super class of all exception type classes? | Throwable | |
327 | Which of the following operators is used to generate instance of an exception which can be thrown using throw? | new | |
328 | Which of the following keyword is used by calling function to handle exception thrown by called function? | throws | |
329 | Which of the following handles the exception when a catch is not used? | default handler | |
330 | Which part of code gets executed whether exception is caught or not? | finally | |
331 | Which of the following should be true of the object thrown by a thrown statement? | Should be assignable to Throwable type | |
332 | Which of these is a super class of all exceptional type classes? | Throwable | |
333 | Which of these class is related to all the exceptions that can be caught by using catch? | Exception | |
334 | Which of these class is related to all the exceptions that cannot be caught? | Error | |
335 | Which of these handles the exception when no catch is used? | Default handler | |
336 | What exception thrown by parseInt() method? | NumberFormatException | |
337 | Which of these keywords is used to generate an exception explicitly? | throw | |
338 | Which of these class is related to all the exceptions that are explicitly thrown? | Throwable | |
339 | Which of these operator is used to generate an instance of an exception than can be thrown by using throw? | new | |
340 | Which of these keywords is used to by the calling function to guard against the exception that is thrown by called function? | throws | |
341 | Which of these clause will be executed even if no exceptions are found? | finally | |
342 | A single try block must be followed by which of these? | finally & catch | |
343 | Which of these exceptions handles the divide by zero error? | Arithmetic Exception | |
344 | Which of these exceptions will occur if we try to access the index of an array beyond its length? | ArrayIndexOutOfBoundsException | |
345 | Which of these classes is used to define exceptions? | Exception | |
346 | Which of these methods return description of an exception? | getMessage() | |
347 | What is the use of try & catch? | All of the mentioned | |
348 | Which of these keywords are used for generating an exception manually? | throw | |
349 | Which of these statements is incorrect? | try need not to be followed by anything |