iGET

Java Programming - MCQ Practice Questions

Java interviews and campus tests lean heavily on object oriented behaviour rather than API recall. This set covers inheritance and polymorphism, interfaces and abstract classes, the collections framework, exception handling, multithreading, string handling, and JVM basics such as garbage collection. Output based questions are included because they expose the gaps that theory questions hide.

951 questions | 100% Free

Q.21Hard

What is the difference between List<Object> and List<?> in practical usage?

Q.22Hard

What is the compiled bytecode signature of this generic method?
public <T extends Comparable<T>> T findMin(T[] arr)

Q.23Hard

Which statement about generic array creation is correct?

Q.24Hard

What output will this produce?
java
List<? super Integer> list = new ArrayList<Number>();
list.add(5);
Integer val = (Integer) list.get(0);

Q.25Hard

Which Java feature was introduced specifically to support generics compilation?

Q.26Hard

A method processes collections where items need to be added back to the same collection type. Which wildcard approach ensures type safety for write operations?