Java MCQ Quiz Hub

Java Mcq Question Set 6

Choose a topic to test your knowledge and improve your Java skills

1. Which of these class can generate an array which can increase and decrease in size automatically?




2. Which of these method can be used to increase the capacity of ArrayList object manually?




3. Which of these method of ArrayList class is used to obtain present size of an object?




4. Which of these methods can be used to obtain a static array from an ArrayList object?




5. Which of these standard collection classes implements a linked list data structure?




6. Which of these method is used to add an element to the start of a LinkedList object?




7. Which of these method of HashSet class is used to add elements to its object?




8. Which of these methods can be used to delete the last element in a LinkedList object?




9. Which of these object stores association between keys and values?




10. Which of these method is used to reduce the capacity of an ArrayList object?




11. Which of these classes provide implementation of map interface?




12. Which of these method is used to remove all keys/values pair from the invoking map?




13. Which of these method Map class is used to obtain an element in the map having specified key ?




14. Which of these methods can be used to obtain set of all keys in a map?




15. Which of these method is used add an element and corresponding key to a map?




16. Which of these standard collection classes implements all the standard functions on list data structure?




17. Which of these method is used to make all elements of an equal to specified value?




18. Which of these method of Array class is used sort an array or its subset?




19. Which of these methods can be used to search an element in a list?




20. Which of these method is used to change an element in a LinkedList Object?




21. Which of these standard collection classes implements all the standard functions on list data structure?




22. Which of these classes implements Set interface?




23. Which of these class object can be used to form a dynamic array?




24. Which of these are legacy classes?




25. All of the above




26. What is the name of data member of class Vector which is used to store number of elements in the vector?




27. Which of these methods is used to add elements in vector at specific location?




28. Which of these class object uses key to store value?




29. Which of these method is used to insert value and its key?




30. Which of these is the interface of legacy is implemented by Hashtable and Dictionary classes?




31. Which of these is a class which uses String as a key to store the value in object?




32. Which of these methods is used to retrieve the elements in properties object at specific location?




33. Which of these class object has architecture similar to that of array?




34. Which of these method is used to make a bit zero specified by the index?




35. Which of these method is used to calculate number of bits required to hold the BitSet object?




36. Which of these is a method of class Date which is used to search weather object contains a date before the specified date?




37. Which of these methods is used to retrieve elements in BitSet object at specific location?




38. Which of these is a process of writing the state of an object to a byte stream?




39. Which of these process occur automatically by java run time system?




40. Which of these interface extends DataOutput interface?




41. Which of these is a method of ObjectOutput interface used to finalize the output state so that any buffers are cleared?




42. Which of these is method of ObjectOutput interface used to write the object to input or output stream as required?




43. Which of these is a process of extracting/removing the state of an object from a stream?




44. Which of these process occur automatically by java run time system?




45. Which of these is an interface for control over serialization and deserialization?




46. Which of these interface extends DataInput interface?




47. Which of these is a method of ObjectInput interface used to deserialize an object from a stream?




48. Which of these class extend InputStream class?




49. Which of these method can be used to make the main thread to be executed last among all the threads?




50. Which of these method is used to find out that a thread is still running or not?