Here are questions 31-60, covering the rest of your syllabus. Garbage Collection doesn't get its own block since Q24 already covers it. One file per question again, with a main method unless stated.
Lambda Expressions & Functional Interfaces
Pipeline<T> that chains Function<T,T> stages built from lambdas and method references. Support addStage, execute, and a Predicate<T> guard that skips a stage when it fails. Demonstrate Supplier, Consumer, UnaryOperator and BiFunction with one realistic use each.memoize(Function<K,V>) that wraps any function with a HashMap cache and returns a new function. Use it to speed up a recursive Fibonacci, and print the call counts with and without memoization. Add a curried Function<Integer, Function<Integer,Integer>> adder.Wrapper Classes & Strings
aaabbc into a3b2c1, all without using collections for the first and third.String, StringBuilder and StringBuffer: concatenate 100,000 times with each, time them with System.nanoTime, and print the results. Demonstrate reverse, insert, deleteCharAt and setLength, and show the string pool with new String("a") versus a literal versus intern().John,"Doe, Jr.",25) into a String[] without using split or any library. Add a method that converts each field to Integer or Double when possible using parseInt/valueOf, handling NumberFormatException.Exception Handling
InsufficientFundsException and an unchecked InvalidAccountException. Write an ATM simulation where a method declares one and throws the other. Demonstrate multi-catch, finally ordering, and a case where finally overrides a return.AutoCloseable, and use it in try-with-resources with two resources. Make both close() methods throw, and print the primary and suppressed exceptions. Show the closing order.retry(int attempts, Callable<T> task) that retries on a specified exception type, rethrows a wrapped custom exception with the original as cause after the last failure, and prints the full cause chain and a stack trace excerpt.File I/O
BufferedReader and print the top 10 words with counts. Create the input file from code if it is missing. Compare it with a Files.lines version.java.nio.file, recursively walk a directory with Files.walkFileTree, print an indented tree with file sizes, find the 5 largest files, then copy one file and delete the copy. Handle IOException properly.Serialization & De-serialization
Student object graph (with a nested Address and a list of Course objects) to a file and read it back. Mark one field transient (a password), show that it comes back null, and explain serialVersionUID by changing the class and showing the InvalidClassException.writeObject/readObject that encrypts the password with a simple Caesar shift during serialization. Then implement a Singleton that stays a singleton after deserialization using readResolve, and prove it with ==.Date & Time API