interview
281 tutorials tagged “interview”.
- Anonymous Class vs LambdaAnonymous classes and lambdas can both implement an interface inline. Learn the differences in syntax, this, state, interfaces supported and performance.
- Difference Between Array and ArrayListArray vs ArrayList in Java: fixed vs dynamic size, primitives vs objects, length vs size(), performance, and when to use each, with examples.
- ArrayList Internal WorkingHow ArrayList works inside: the internal array, default capacity of 10, growth by 1.5 times, copying on resize, and the cost of add, get and remove.
- Difference Between ArrayList and LinkedListArrayList vs LinkedList in Java: internal structure, speed of get, add and remove, memory use, and how to choose, with a timing example.
- Difference Between ArrayList and VectorArrayList vs Vector in Java: synchronization, performance, growth rate, legacy methods and iteration. Learn the differences and which one to use.
- Arrays.asList vs List.ofArrays.asList and List.of both create lists quickly, but differ in mutability, null support and their link to the array. Learn every difference with examples.
- Atomic Variables in JavaAtomic classes such as AtomicInteger, AtomicReference and LongAdder update values safely without locks. Learn their methods and when LongAdder wins.
- Buffered Streams in JavaBuffered streams cut disk access by reading and writing in large blocks. Learn BufferedReader, BufferedWriter and friends, and measure the speed-up.
- Built-In Functional Interfaces in JavaThe java.util.function package: Predicate, Function, Consumer, Supplier, UnaryOperator, BinaryOperator and BiFunction, with their methods and examples.
- Bytecode Basics in JavaHow JVM bytecode works: frames, local variable slots, the operand stack, instruction families, a loop traced step by step, and the five invoke instructions.