Interview Questions

Category Archives: Interview Questions

Read Excel file using Java – Apach POI

Let’s see how can you Read Excel file using Java using Apache POI. Java doesn’t provide direct API to read and write Excel document, you have to rely on third party libraries. To read and write XLS or XLSX file you can use JXL open source library or Apache POI library. I will suggest to … Continue reading Read Excel file using Java – Apach POI

How to Compare Two Arrays in Java

Let’s see, How can you compare Two Arrays in Java to verify,  If they are equal to each other or not. Please note you can’t compare a String array to an int array. You can compare the Array only if they have the same data type.   Compare Two Arrays in Java To compare two … Continue reading How to Compare Two Arrays in Java

Find Largest and Smallest Number in Array

Let’s see, How can you find largest and smallest number in Array. Understanding of array data structure is very important for any software developer or Automation Test Engineer. Find smallest and largest number in the Array is one of favorite Interview question in Java Programming. In this program, you need to write a method, which … Continue reading Find Largest and Smallest Number in Array

Bubble Sort in Java

Today we will see, How can you perform Bubble Sort in Java. Bubble sort is sorting algorithm which is used to Sort Array in Java.   Using Bubble sort algorithm we sort an unsorted array by starting from the first element and comparing with an adjacent element. If the first element is greater than later … Continue reading Bubble Sort in Java

Reverse String Program in Java – Java Interview Question

This is common interview question, How to reverse String in Java without inbuilt method. You have inbuilt method to reverse String in Java library, StringBuffer and StringBuilder class with reverse() method which can be used to reverse String in Java.   In this Java tutorial, you will see How to reverse String using StringBuffer, StringBuilder and … Continue reading Reverse String Program in Java – Java Interview Question

How to Remove Space from String in Java

Java String provides several inbuilt methods to remove space from String in Java like trim() method, which removes whitespace from beginning and end.   While using the trim() method, the key thing to remember is that trim() returns a different String object than the older one because String is immutable in Java. On the other … Continue reading How to Remove Space from String in Java

Search Element in Array in Java

Let’s see, How can you Search Element in Array. In Java Programming, sometimes we need to check if a String array contains a particular String or an int array contains a number or not. Java API does not provide any direct method to check element index. We need to use Apache Commons utility class called ArrayUtils. … Continue reading Search Element in Array in Java

100+ SQL Query Interview Questions With Answers-II

Before this, we have seen 100+ SQL Interview Questions with Examples -I 41. Get employee details from employee table whose employee name is “John”

  42. Get employee details from employee table whose employee name are “John” and “Roy”

  43. Get employee details from employee table whose employee name are not “John” and “Roy”

Continue reading 100+ SQL Query Interview Questions With Answers-II

100+ SQL Query Interview Questions With Answers-I

Let’s see, SQL Interview questions and answers or SQL query interview questions and answers. 1. How to select all records from the table? To select all the records from the table we need to use the following syntax:

  2. SQL Query to find second highest salary of Employee? There are many ways to find second … Continue reading 100+ SQL Query Interview Questions With Answers-I