Top 50 SDET Java Programming Interview Questions & Answers

Carvia Tech | September 18, 2019 | 4 min read | 555 views


Java Questions

  1. What is the difference between JDK JVM and JRE

  2. What is super class in Java?

  3. What is Polymorphism? What is Abstraction, give a practical example.

  4. How will you make sure that main thread is the last one to exit?

  5. Main Interfaces in Collections API - List, Set, Map. What is the difference between them?

  6. Enumerator vs Iterator? Which one is thread safe?

  7. Can collection classes be made serializable. How to do that?

  8. Catch NPE first and Exception in last, will that work? Discuss the exception hierarchy. What are the inheritance rules for Exceptions?

  9. Error and exception difference with an example. StackoverflowError, OOMError, etc.

  10. Custom exceptions, how will you create one?

  11. How will you compare two java objects?

  12. Multiple inheritance in Java? How does Java 8 address this?

  13. What is method overloading in Java?

  14. What is method overriding in Java?

  15. Difference between Overriding and Overloading a method

  16. Inheritance vs Composition in Java

  17. How to swap two numbers without a temporary variable? Discuss XOR approach. what are problems with addition approach?

  18. Which one is better - extending Thread class or implementing Runnable interface

Algorithms and DS

  1. What are different sorting algorithms

  2. How to find the relative efficiency of a given algorithms

  3. Find first not-repeating character by iterating through the length of the string only once and by using constant space.

  4. Print prime numbers up to x

  5. Implement a stack data structure.

Testing Frameworks

  1. JUNIT vs TestNG what are differences? Which one is better for QA?

  2. TestNG hierarchy - Tests, suites, classes, etc.

  3. Parameterization of tests in TestNG and data providers.

  4. TestNG Listeners. Uses

  5. Selenium and Rest API testing frameworks

  6. How will you design API Testing suite

Linux & Shell Scripting

  1. Basic shell commands and scripting

  2. How to create a service for running jar

  3. How to run a program in background

  4. How to make sure that a program is restarted if terminated

  5. How to list selected processes

  6. How to kill a process

  7. How to search for keywords in files in current directory

  8. What is awk command, sed command

  9. How to copy a file from one machine to another?

  10. How will you enable password less SSH login into server machine?

  11. Continuously monitor last 100 lines of a log file.

  12. How to connect to a remote server and execute certain commands.

  13. I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this? unix pipes.

  14. Unix permissions concepts chmod +x file.

  15. How does password less login works? At a higher level.

  16. How to find size of current directory?

  17. How to check free disc space and memory in Unix?

  18. How to list all running processes and see their cpu utilization?

  19. How to find a process running on given port in mac/ubuntu

  20. How to search given directory for specific text

  21. How to find a given process in Unix and kill it

  22. How to start a process in background mode, so that it keeps running even after terminal is closed.

  23. What are different UNIX file permissions?

Database and SQL

  1. Employee and Department table - all employees from employee table and only departments that exists for an employee from department table. Left outer join.

  2. How to delete duplicate records from a given table. (duplicate based on specified fields)

  3. 2nd highest salary in SQL, how will you find it out.

  4. What is Inner Join and Left Outer Join

  5. Find all those customers who have not placed any order yet. There are two tables Customer and Order, Order table contains foreign key to Customer table.

Build Tools and CI/CD

  1. Maven and Gradle basics (PMD rules, Firebug, Code coverage tools, etc.)

  2. What is CI and CD

  3. How is your CI/CD and build environment setup in your project. Jenkins, Regression Test, etc. explain the stuff.

  4. How to setup a build pipeline in jenkins

  5. How to seamlessly deploy to AWS ec2 cloud upon single commit in version control. Just the high-level steps/approach.

Security Testing

  1. How will you test APIs from security aspects. What are different areas you will cover?


Top articles in this category:
  1. SDET: JUnit interview questions for automation engineer
  2. How to reverse a number in Java
  3. Write a program to reverse a string using recursion in Java
  4. SDET: Rest Assured Interview Questions
  5. SDET Java Role - Essential Skills
  6. Write a program to reverse the order of words in a string
  7. Calculate Fibonacci Series in Java



Find more on this topic:
SDET Interviews image
SDET Interviews

SDET Java Interview pattern and collection of questions covering SDET coding challenges, automation testing concepts, functional, api, integration, performance and security testing, junit5, testng, jmeter, selenium and rest assured

Last updated 1 week ago


Recommended books for interview preparation:

This website uses cookies to ensure you get the best experience on our website. more info