Top 50 SDET Java Programming Interview Questions & Answers

Carvia Tech | July 03, 2019 | 4 min read | 483 views


Java Questions

  1. What is difference between JDK JVM and JRE

  2. What is super class in Java?

  3. What is Polymorphism? What is Abstraction, give an 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 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 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 addresses 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 upto x

  5. Implement a stack data structure.

Testing Framework Questions

  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 a 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.


Top articles in this category:
  1. How to reverse a number in Java
  2. Write a program to reverse a string using recursion in Java
  3. SDET Java Role - Essential Skills
  4. Calculate Fibonacci Series in Java
  5. How to check if the given number is palindrome in Java
  6. Java program to check if two strings are anagrams
  7. Check if the given number is Armstrong Number in Java



Find more on this topic:
SDET Interviews image
SDET Interviews

End to end automation testing using Selenium Web Driver, Rest Assured, JMeter, Junit, TestNG etc.

Last updated 1 month ago


Recommended books for interview preparation:

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