
Prepare for a Java job interview with hands-on coding practice, company-style questions from Google, Amazon, and Netflix, and soft skills tips to build confidence and engage interviewers.
Explore java fundamentals, memory management, arrays, collections, maps, and interview puzzles, with an overview of the interview process and practical tips.
Install Java 8 on Windows 10 by downloading the Oracle JDK, running the installer, and selecting default JDK and JRE options to validate the setup.
Download eclipse for Java developer and install neon on Windows 10, extract the zip, and launch the Eclipse exe. Create a Hello world Java project to validate the setup.
Install the learning material from the Git repository by downloading the zip and importing it into Eclipse, then validate with JDK setup and JUnit tests.
Explore how string creation in Java works, comparing new and literal strings, and discover the string pool and interning as memory-saving techniques for immutable objects.
Explore how string intern() adds runtime strings to the string pool, enabling shared memory and faster == comparisons, while contrasting literals and interned strings with garbage collection implications.
Explore how Java achieves immutability with final classes and private fields. See that substring returns a new String, and wrapper classes such as Integer are immutable.
After taking this lesson you will know why do we need immutable objects, and how they can be created.
Learn why you should use copy constructor
Learn how to duplicate objects in Java with the Cloneable interface and clone method, including shallow versus deep cloning and handling clone not supported exceptions.
Demonstrates implementing Cloneable and overriding clone in a student object with an address, showing shallow versus deep copying. Clone the address to achieve independent copies and understand reference behavior.
Explore marker interfaces in java, empty interfaces that indicate to the compiler or JVM that a class can be cloned or serialized, with examples like Cloneable, Serializable, and Remote.
discover how the Java virtual machine enables write-once-run-anywhere, then explore memory management, memory allocation, exceptions, garbage collection phases (stop the world), object finalization, and classloader concepts for interview prep.
Explore how the JVM manages memory, including the heap, garbage collection, and out-of-memory errors, and learn about eden, survivor, tenured, perm gen, metaspace, and string pool changes after Java 8.
Learn how to handle java out-of-memory errors by inspecting object creation, reducing object size, and tuning memory with JVM arguments for heap, metaspace, and the young generation.
Request garbage collection with System.gc() to hint the JVM, but it may not run immediately and invoking it adds overhead. Explore memory metrics like maxMemory, totalMemory, and freeMemory.
Explore how stop-the-world garbage collection pauses all threads to reclaim memory, and compare it with incremental and concurrent collectors that reduce disruption.
Learn how object finalization cleans up resources beyond memory, such as network connections and file handlers, either via the finalize method or the garbage collector, with System.gc() and System.runFinalization().
Learn to close resources safely by favoring a try finally block over finalize, understand garbage collection timing, and use try with resources as a modern backup for reliable resource cleanup.
Explore how the Java classloader loads bytecode into the JVM on demand, from file systems, networks, archives, or databases, and distinguish the bootstrap, extension, and system classloaders with practical examples.
Explore the classloader principles of delegation, visibility, and uniqueness in Java. Understand how application, extension, and bootstrap classloaders load or defer classes, and the jar hell risks in classpath issues.
Wraps up the JVM section by reviewing memory areas such as eden, survivor, tenured, and metaspace, garbage collection phases, and classloader principles like delegation, visibility, and uniqueness.
Explore the fundamentals of arrays, including creation, initialization, element access, sorting, and searching, and learn common interview questions and puzzles such as removing duplicates to boost your Java interview prep.
After taking this lesson you will know all the basic needed to pass interview question about arrays.
After taking this lesson you will know how Arrays are initialized by default in Java.
Explore explicit array initialization and the new operator to populate boolean, int, string, and student arrays. Use initialization lists, for loops, and compiler inference to set array lengths and values.
After taking this lesson you will now how to overcome array limitation.
Learn how Java varargs lets a single method accept zero or more arguments by automatically creating an internal array, avoiding excessive method overloading while addressing performance considerations.
Explore how to declare and initialize multi dimensional arrays in Java, understand the memory structure of array of arrays, and learn how varying row lengths appear in interview puzzles.
Explore a hands-on demo of multi-dimensional arrays in Java, including creating a two-dimensional string array, indexing elements, printing results, and comparing traditional loops with foreach printing.
Learn how to remove duplicates from an int array without collections by sorting then deduplicating, balance memory use and performance, and understand limitations like zero flags and losing original order.
Explore how Java's collection framework uses interfaces, implementation classes, and utilities to manage lists, queues, sets, and maps with core operations like add, clear, remove, and size.
Understand the list interface as an ordered collection with index-based access and duplicates, learn its methods such as add(index, element) and get(index), and review implementations like ArrayList, LinkedList, and Vector.
Explore how ArrayList, a dynamic array implementing the list interface, differs from fixed-size arrays. Learn interview concepts like insertion order, index-based add and get, resizing cost, auto boxing, and duplicates.
Explore ArrayList basics: add elements, iterate with for loops and iterators, and observe that insertion order is preserved along with duplicates and nulls.
Explore how ArrayList uses an underlying Object[] to add and remove by index, shifting elements, handling dynamic growth, and answering interview questions about performance and exceptions.
Explore how Java's ArrayList dynamically resizes by creating a new array and copying elements, increasing capacity by half of the previous capacity, and distinguishing size from capacity.
Compare ArrayList and Vector in Java; learn that Vector is synchronized and thread safe, while ArrayList is not. Use Vector for multithreaded access, otherwise prefer ArrayList.
Explore Java's linked list as the list and Deque implementation, a doubly linked, ordered collection with head and tail, offering constant time insertion or removal via iterators, with sequential access.
Demonstrates a Java linked list demo by showing get by index, getFirst, getLast, removeLast, addLast, and iteration, and explains when to use array list versus linked list.
Use an iterator to traverse collections, thanks to hasNext, next, and remove, which lets you modify the underlying collection during iteration and supports generic, fail-fast traversal in multi-threaded contexts.
Learn the fail-fast principle: iterators stop and throw a concurrent modification exception when a list is structurally modified during iteration, as shown with ArrayList and a modification counter.
Explore the fail-fast versus fail-safe iterator principles in Java, including how CopyOnWriteArrayList handles concurrent modification by iterating over a clone, avoiding exceptions, and the trade-offs of extra memory.
Compare a regular iterator with a list iterator, covering forward and backward traversal, nextIndex and previousIndex, and the add, set, and remove capabilities during iteration.
Explore java.util.hashmap, its O(1) search, and its role in the java collection framework, and compare hash map, hash table, tree map, and linked hash map for interview prep.
Explore the map interface in Java, learn how it maps unique keys to values, cannot contain duplicate keys, and use keySet, values, and entrySet views to access data.
Demonstrates hash map usage in Java by creating a generic HashMap<Integer, Student>, using put to add three entries, get to retrieve by key, and iterating with keySet, values, and entrySet.
Explore how hash map replaces the value for an existing key, returns the old value, and supports null keys and null values, including size and iteration behavior.
Compare hash map and hash table, focusing on thread safety, null handling, and performance, and explore their history, enumeration versus iterator, and practical interview implications.
Explore common map implementations like hash map and hash table, including how they handle null keys and values, ordering, and performance, with comparisons to linked hash map and tree map.
Learn how equals and hashCode enable Java collections to manage objects and how to decide which fields to include when generating them, with hash map put and get usage.
Understand how hash maps use a bucketed array, hash codes, and equals. Java 8 switches to a balanced tree for many collisions, emphasizing a good hashCode.
Explore how hash maps resize and rehash, manage capacity and load factor, and the threshold that triggers doubling from 16 to 32; compare size and capacity.
Explore puzzle concepts for a middle level Java interview by practicing algorithm and coding logic questions, reviewing real code solutions, and applying Java API insights.
Learn to print a 3x3 two dimensional matrix in spiral order, from left to right, top to bottom, then right to left and bottom to top, with JUnit testing.
Learn to iterate a two dimensional matrix in a spiral using a getSpiralArray method, while tracking row and column ranges through left-right, top-down, right-left, and down-top directions with JUnit tests.
Determine the maximum profit from stock prices by buying before selling, with no shorting allowed, using an Apple stock example, and analyze the brute force n^2 approach with stepwise decomposition.
Traverse the price array in one pass, track the minimum price and the running maximum profit with a greedy O(n) approach, while validating input and testing with JUnit.
Learn the software interview process from phone interviews to technical tests and face-to-face interviews, including soft skills, teamwork, and how you function under pressure.
Master phone interviews with thorough preparation, a quiet, distraction-free setting, note-taking, and company research; expect a company intro and high-level technical questions, plus thoughtful questions for the interviewer.
Explore at-home computer interviews for a middle-level Java role, writing real compiled code, preparing a favorable environment, and using Codility for objective, automated and human evaluation with tests.
Discover how technical written tests shape early Java interviews, covering multi-choice questions and paper coding without an IDE. Learn to read questions, pace yourself, and write clear code on paper.
Explore computer interviews at the office with integrated IDEs, Java API lookups, and bug finding, while practicing unit tests and debugging under realistic interview pressure.
In a face to face interview, showcase soft skills and curiosity by researching the company and job specs, and engage in collaborative, problem-solving discussions with the interviewer.
Master the human resource interview by demonstrating softer skills, team fit, and professional communication, prepare thoughtful answers to common questions, and navigate salary expectations toward a job offer.
Assess a job offer by consulting the hiring manager or HR to resolve doubts, negotiate salary and benefits, compare market range, and only accept if the role truly fits.
Understand the two-way interview process and the different interview types, from phone to human resource interviews. Prepare thoroughly and ask thoughtful questions to demonstrate fit for your Java dream job.
Hello and Welcome!
Scared of coding interview?
This course will practice you with the must know Java interview questions.
In addition it will also prepare you to crack Java puzzle pattern. If you can learn the pattern, you can beat coding interview!
If you want to get your dream job, and you are serious about your career you should take this course.
In this course we will review Java interview questions from different areas:
Lesson structure
The lecture were divided to short lectures of about 5 min each, so you will be able to come back to a specific topic and replay the lesson without the need to search in a specific long video for the part that you would like to repeat on.
Each lesson will include several questions; all of them are from real interviews. We'll go over the questions and answer them.
Quiz
Summarizing each few classes there will be a quiz, designed to repeat the material and help the student understand it even better.