
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Know that the JDK is a set of tools to write Java programs. Run compiled Java programs with the JRE, and use the JVM to execute Java bytecode.
The Java compiler translates Java source code into Java bytecode, an intermediate language used by the JVM after compiling main.java.
Explore why Java is platform independent through write once, run everywhere, detailing how Java source code becomes bytecode and is executed by the JVM on different platforms.
Learn the key updates in Java 8 and Java 11, including lambda expressions, streams, and default methods, plus Java 11 features like Http client and var support.
Java provides eight primitive types—byte, short, int, long, float, double, char, and boolean—to declare variables with distinct ranges. Char maps to ASCII values, while boolean stores true or false.
Explain the differences between string, string builder, and string buffer, highlighting the immutable string, the mutable string builder, and the thread-safe string buffer, with guidance on when to use each.
Use the string length method in Java to determine the number of characters, including spaces; it returns an int. For example, the string yields 21.
Explore how the == operator checks references for objects and how equals validates string content, including string pool behavior and the impact of new string objects.
Discover how wrapper classes map each primitive to an object in Java, why generics require wrappers, and how Integer offers methods such as max and max value.
Use a while loop when you don't know the exact number of iterations in advance, and a for loop when you know it, because for loops include an increasing variable.
Learn how varargs in Java use the three-dots syntax to accept a dynamic number of arguments or an array, and ensure the varargs parameter is the last argument.
Discover how Java constructors are special methods that create objects, share the class name, can take arguments, assign properties, and be overloaded or default if none is defined.
Explore how the final keyword in Java tags variables, local variables, methods, and classes to prevent changes, extensions, or overrides, with examples of final variables, final classes, and final methods.
Master encapsulation by making fields private and using getters and setters with validations, including null or empty name checks and invalid age handling, and safeguarding mutable lists by returning copies.
Explore how Java uses single inheritance via extends, letting a student inherit visible properties from person for code reuse. Java prohibits multiple inheritance to avoid the diamond problem.
Explain how a child class overrides a parent method and hides a parent property, using a student extending person, with the override keyword and property shadowing, in Java.
Learn abstraction and polymorphism in Java, using abstract methods and templates, and understand the difference between interface and abstract class. See runtime polymorphism with reference types.
Differentiate method overriding from overloading by showing how overriding requires inheritance or interface implementation and same method signature, while overloading uses the same name with different arguments within one class.
Learn to get an array’s length using the length instance variable, not a method. Use the size method for array lists; they wrap an underlying array and resize from ten.
Explore Java sets in the collection framework, highlighting unique elements and no duplicates, with hashset (unordered), linkedhashset (insertion order), and treeset (sorted); see coding examples and order differences.
Explore how Java maps store key‑value pairs with unique keys, including HashMap (based on a hash table), LinkedHashMap, and TreeMap, where order and key sorting vary.
Learn to iterate maps via entry set or key set with loops, iterators, or streams, and compare hash map versus hash table, noting null handling and thread safety.
Explore the arrays and collections helper classes in Java, using static methods to print, sort, compare arrays, perform binary search, and sort collections via the util package.
This lecture explains that runtime exceptions are optional to handle, while checked exceptions must be handled to compile; runtime extends runtime exception and checked extends exception, with number format exception.
Explore how to handle multiple exceptions with a single try-catch by using a common superclass or the pipe operator, and learn the order rules for specific vs generic exceptions.
Explain how try with resources automatically closes resources like file readers and buffered readers, declaring the resource in the try parentheses and leveraging Closeable.
In Java, an error is a system level failure you don't handle. Errors are managed by the gvm and, if touched, behave like runtime exceptions.
Learn to implement a string reverse function in Java by building the result with a StringBuilder, looping from the back and validating with test cases.
Learn to reverse an int array in place using a two-pointer approach that swaps elements from both ends with a temporary variable, demonstrating in-place modification via array references.
Learn to implement a prime number check by testing divisibility from two to half of the target and using the remainder to decide primality.
Determine whether two strings are anagrams by converting to char arrays, sorting, and comparing, with examples including listen and silent, triangle and integral.
Learn how to detect palindromes in Java by two methods: reverse and compare the string, then a two-index approach using start and end, with examples Anna, Civic, and Apple.
Learn to find second max and second min in an array using an index-aware pass and a sort-based approach, including a helper to avoid an index and edge-case handling.
Explore how the string pool and the equals versus == operator affect object references in Java, showing why identical literals point to the same object while new creates distinct ones.
Practice swapping variables without creating any new variables by applying J = J - I; I = I + J; J = I - J on J and I.
Explore two implementations to remove duplicates from a string in Java: one using a contains check with a string builder, and another using a linked hash set to preserve order.
Learn to count letters in a string by iterating characters and updating a map of character counts. Use a linked hash map to preserve insertion order and return the counts.
Implement a void method that prints 1 to 100, replacing multiples of three with fizz, five with buzz, and both with fizzbuzz, and beware the gotcha of if-statement order.
Write a method to determine even or odd numbers using the remainder or mod operator, printing 'even' when the number modulo two equals zero and 'odd' otherwise.
Implement a brute force two-sum solution using nested loops to find two numbers in an int array that sum to the target, returning a two-element result or 0 0 if none.
Learn to implement a Java method that prints the first n Fibonacci numbers in one line, starting with 0 and 1, by updating two running variables inside a loop.
Learn to check balance of strings with parentheses, square brackets, and curly braces using a stack: push openings, pop on closings, and verify matching pairs.
https://youtu.be/RT-hUXUWQ2I?si=-CkUcy24hSeYzUPh
https://youtu.be/3hH8kTHFw2A?si=NKLRnDWEn4dN5upR
https://youtu.be/T98PIp4omUA?si=uIRkjoPah2Ykfmc2
Explore how big O notation measures runtime growth with input size, compare algorithm efficiency, and identify O(1), O(n), and O(n^2) patterns in interviews.
Explore big-O notation and runtime analysis through practical examples, including string and array reversals, prime testing, anagram checks, and sorting, with emphasis on linear and n log n complexities.
Practice time complexity analysis with palindrome and number reversal examples, showing linear and n log n behavior, and compare max, sorting, and duplicates removal for big O outcomes.
Analyze runtime complexity across six examples, including quadratic cases like sum of two, bubble sort, and selection sort, plus constant time fizzbuzz and even/odd checks, and binary search.
Defect means actual result differs from the expected result, defined by specifications or requirements; even if not specified, being hard to use, slow, or not right counts as a defect.
Describe a test plan as a detailed document including entrance criteria, scope, test strategies, objectives, schedule, resources, and exit criteria, guiding testing and promoting stakeholder transparency.
Describe a test case by detailing steps to test a specific feature, including test data, expected results, environment, and prerequisites.
Define the defect life cycle from opening to resolution, including raising a ticket, assigning a fix, fixing, retesting, reopening if needed, and closing.
Map and trace user requirements with test cases using the requirements traceability matrix to validate that every function is tested and no functionality goes unchecked.
Define a regression suite as a collection of test scenarios that validate existing functionalities after changes. Automate tests built from previous releases before each release to prevent regressions.
Define the smoke test as initial testing that reveals simple issues by running a subset of critical functionality. Automate it in a CI pipeline to catch issues early before environments.
Identify and apply key testing techniques such as positive testing, negative testing, equivalence partitioning, boundary value testing, and ad hoc testing to validate software behavior.
Define performance testing as a non-functional test that measures an application's stability, speed, scalability, and responsiveness. Include examples like maximum concurrent users, memory utilization, latency, data transfer, and bandwidth.
Learn what 508 compliance testing is and how to perform it using online verification tools and manual analysis to ensure accessibility for users with disabilities.
Generate test data by yourself or load production data by hiding or shuffling sensitive fields like social security numbers and addresses to test admins, students, and projects.
Learn how the document object model represents the HTML document as an in-sync object, and how JavaScript manipulates the DOM with methods like getElementById and remove.
Explore selenium locators for web elements, including id, name, className, XPath, CSS, link text, partial link text, and tag name; prefer id or name when unique, otherwise CSS or XPath.
Compare XPath and CSS to master locator strategies, noting CSS is faster for locating elements while XPath offers text-based queries and bidirectional DOM traversal.
Compare implicit and explicit waits in Selenium, showing how a global implicit wait applies to all elements and how explicit waits target specific conditions.
Reveal the difference between findElement and findElements in Selenium: findElement returns a single element and throws if absent, while findElements returns a list and yields empty list when none exist.
Compare two strategies to verify a DOM element's existence: catch no such element exceptions from find element, or check the nonempty size of the list from find elements.
Learn how to handle multiple windows in Selenium by using window handles, switching to the latest window, reading its title, and returning to the original window.
Master how to work with ui dropdowns in Selenium, using the select tag and select class with visible text, index, or value, and handle custom dropdowns.
Learn how to handle pop ups in selenium, distinguishing alert based pop ups from custom HTML pop ups, using switch to alert and the alert class, with waits for actions.
Demonstrates typing text in a selenium input box using the send keys method by creating the element and sending a string, with input or textarea tags.
Learn how to upload files in selenium using the sendKeys method to input the file path, with a relative path from the test resources folder.
Learn how the Selenium actions class handles keyboard and mouse events, including drag and drop, hover, double click, and right click, using build and perform to execute actions.
Discover how the page object model in selenium creates an object repository with a class per web page, housing elements and methods to reduce duplication.
Identify how stale element exceptions occur in selenium when a web element is not up to date after navigation, and retry locating with implicit or explicit waits and re-locating.
Understand how remote WebDriver runs test scripts on a client while browsers execute on remote machines via a Selenium grid, enabling server-based automation with Jenkins.
Selenium Grid enables remote WebDriver execution by routing commands to remote browsers on nodes across machines, enabling parallel tests, multiple browser versions, and cross-platform testing.
Explain how Sauce Labs and BrowserStack provide cloud-based selenium grid for testing web and mobile apps, enabling remote device access and automated and manual testing as a service.
Learn how Cucumber runs automated tests in plain language, supports behavior-driven development, and uses step definitions to implement each step, with a sample scenario shown.
Cucumber delivers reusable code as the framework matures and provides readable scenarios that reveal test logic. Parameterized steps and feature files let you maintain generalized steps and simplify debugging.
Explore how the Gherkin language writes cucumber scenarios by authoring feature files with Gherkin scripts, keywords, tags, and its syntax.
The runner class serves as the execution point for cucumber and links feature files to step definitions, while configuring plugins, tags, and dry run options through JUnit or TestNG.
Learn how scenario outline in cucumber runs the same scenario multiple times with different input data using an examples table to parameterize tests.
Discover how cucumber hooks manage setup and teardown across the test cycle. Use scenario hooks (before/after) and step-based hooks (before step/after step) with examples of initializing drivers, navigation, and cleanup.
Learn to run smoke or regression test scenarios in Cucumber by tagging features and selecting tags in the runner, with dynamic values passed via Maven's Cucumber options.
Explore how JUnit and TestNG function as Java testing frameworks that enable automated unit tests with assertions, a run engine, and reports, and integrate with Selenium for UI automation.
Explore why JUnit and TestNG matter in a Java-based framework, highlighting JUnit's role in assertions and as the running engine for Cucumber-based tests.
Compare TestNG and JUnit differences: TestNG offers extensive annotations, parameterized tests, grouping, and dependencies, plus XML configuration, parallel execution, and data providers, while JUnit lacks built-in support for these features.
Explain the difference between soft and hard asserts in Java testing; hard asserts stop execution at the first failure, while soft asserts continue and report all results at the end.
This course covers JUnit annotations used in testing, including the test annotation, before and after hooks, before clause and after clause, ignore, and a custom test runner.
Discover how Maven automates Java project builds, manages dependencies, and enforces a convention over configuration structure with pom.xml for dependencies like selenium, JUnit, and cucumber.
Learn the Maven life cycles: default, clean, and site, and how they sequence tasks like clean, validate, compile, test, package, and verify, with commands like mvn clean and mvn test.
Learn to run your tests using mvn test or mvn verify in Maven, as both commands are correct according to the discussion.
Pass values from the maven command to your code using system properties with -D. Use System.getProperty("env") in your code to switch environments or credentials, enabling dynamic environment selection from Jenkins.
Hey everyone, my name is Bek and welcome to my Interview Preparation for SDET course with Java. I work as SDE-T at Amazon and I have been teaching Java for SDET position in the coding bootcamp for the last 4 years.
Initially, this course was on Java coding interview challenges, but it is a lot more now. You will learn top Java theoretical questions, top coding challenges, Big O Notation, QA questions, Test Automation general questions, Selenium, Cucumber, JUnit/TestNG, Maven, and framework interview questions, questions, SDLC, and Agile questions.
This course will work best for people who are already working in IT and preparing to go to the job market. Also, if you are in the last stage of your boot camp for SDET, this is a great course to review and prepare for the job market.
Overall, my vision for this course is to make one place for interview prep for SDET. I am working hard to include extra content like API, Git, and SQL.
If you took this course and have questions, please reach out to me. I will be happy to connect with you.
Thank you for your time and attention. I can't wait to see you in my course!