Interview Questions and Answers for 'A' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Newest

   next 30
 Q2821. what do mean by J2EE and java?
 This question was recently asked at 'Capgemini'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2822. What are the different types of inheritance ?Core Java
Ans. Single Level
Multi Level
Hierarchical
Multiple
Hybrid

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2823. What are the different versions used in your project? example spring version ,java etc
 This question was recently asked at 'Capgemini'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2824. what is the difference between application.properties and application.yml ?
 This question was recently asked at 'Capgemini'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2825. Is there a way to access a private method from an outside class ?Core Java
Ans. Through Reflection.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2826. Difference between class and object with example.Core Java
 This question was recently asked at 'TalenPace'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2827. What if we use all access specifiers ? Is it encapsulation ?Core Java
 This question was recently asked at '3 Embeded Software Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2828. Difference between constructor and method ?
 This question was recently asked at 'Fog Creek,IBM India,Cubic,Zymergen,Parexel '.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 5 Companies


 Q2829. Find the second largest array element without sorting?Design
Ans. We initialize two variables first and second to INT_MIN as,
first = second = INT_MIN
then Start traversing the array,
If the current element in array say arr[i] is greater
than first. Then update first and second as,
second = first
first = arr[i]
If the current element is in between first and second,
then update second to store the value of current variable as
second = arr[i]
then Return the value stored in second.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2830. Explain how a class is loaded ?Core Java
Ans. Java classLoder is resposible to load java classes.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2831. What is ng injectable ?Angular Js
 This question was recently asked at 'Herbinger Group'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2832. How do you ftp files to a different server ? Do you use scp or mput etc.Unix
Ans. I use both mput as well as scp. mput usually with sftp

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     unix commands  ftp


 Q2833. Can we change permissions recursively for all folders and files within a single folder ?Unix
Ans. chmod 777 -R /directory

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Unix Commands


 Q2834. difference between the agile model and v model.
Ans. Agile Model:
Agile Model is the software development model in which development and testing process carries on simultaneously. In this model, both development related processes and testing related processes are parallel. This model provides the facility of more interaction between development team, testing team and end-users.

V-Model:
V-Model is the software development model in which testing takes place once the development process is fully complete or almost complete. In V-Model development and testing process are kept quite separate. It is not as reliable as Agile Model.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2835. Why Spring boot is preferred over Spring MVC ?
Ans. Spring Boot aims to shorten the code length and provide you with the easiest way to develop a web application. It helps create a stand-alone application with less or almost zero-configuration.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2836. What is Message Queue or MQ ?Data Structure
Ans. Message queues implement an asynchronous communication pattern between two or more processes/threads whereby the sending and receiving party do not need to interact with the message queue at the same time. Messages placed onto the queue are stored until the recipient retrieves them. Message queues have implicit or explicit limits on the size of data that may be transmitted in a single message and the number of messages that may remain outstanding on the queue.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     message queue     Asked in 1 Companies


 Q2837. what annotation do in background in hibernate ?Hibernate
 This question was recently asked at 'Cdac Pune'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2838. How many objects are created when we define a bean with two different name in spring?Spring
Ans. we wont create the objects because of each and every bean will be an object

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2839. How abstraction worksCore Java
 This question was recently asked at '360Degree'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2840. Explain memory leaks and how to prevent them.
 This question was recently asked at 'Polaris'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     memory leak     Asked in 1 Companies


 Q2841. What is the logic behind the shuffle in Music player ?

or

Explain Music player shuffle algorithm.
Algorithm
 This question was recently asked at 'ASG Sweden'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2842. What is the difference between map and filter methods in streams ?Core Java
Ans. By using map , you can transform the object values. The map operation allows us to apply a function, that takes input parameter of one type, and returns something else.

Filter is used for filtering the data, it always returns the boolean value. If it returns true, then item is added to list else its filtered out (ignored)

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java 8     Asked in 1 Companies


 Q2843. Explain unix commands - cat and pwd.Unix
Ans. by using Cat command we can open and see the file content and as well as redirect the file content to another files

pwd command shows us current working path of the server

cat filename | tail -100

cat file name > filname1

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2844. Explain Rest architectureRest
 This question was recently asked at 'Motorola Solutions,DXC Technology'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q2845. Can we override behavior of a collection class ? How ?Core Java
Ans. Yes. We can do that.

1. We can create own own implementation class extending the collection class and then override the behavior method.

2. We can override the behavior at the time of instantiation of class as following

List<MyType> list = new ArrayList<MyType>() {
public boolean add(MyType mt) {
super.add(mt);
Collections.sort(list, comparator);
return true;
}
};

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     collections


 Q2846. How do you achieve String immutability ?Core Java
 This question was recently asked at 'Polaris'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2847. How does hashmap works ?Core Java
 This question was recently asked at 'Fujitsu'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2848. What is the time complexity and space complexity of reversing a Linked List ?Data Structure
Ans. o(n) for time complexity
o(1) for space complexity

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q2849. Write a program to rotate a matrix.Core Java
Ans. public class Matrix {

   public static void main(String[] args) {
      int[][] matrix = {
            {1, 2, 3},
            {4, 5, 6},
            {7, 8, 9}
      };
      Matrix.rotateMatrix(matrix);
      for (int i = 0; i < matrix.length; i ){
         for (int j = 0; j < matrix.length; j ){
            System.out.print(matrix[i][j] " ");
         }
         System.out.println();
      }
   }

   public static void rotateMatrix(int[][] matrix){
      int row = matrix.length;
      //first find the transpose of the matrix.
      for (int i = 0; i < row; i ){
         for (int j = i; j < row; j ){
            int temp = matrix[i][j];
            matrix[i][j] = matrix[j][i];
            matrix[j][i] = temp;
         }
      }
      //reverse each row
      for (int i = 0; i< row; i ){
         for(int j = 0; j< row/2; j ){
            int temp = matrix[i][j];
            matrix[i][j] = matrix[i][row - 1 - j];
            matrix[i][row - 1 - j] = temp;
         }
      }

   }

}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2850. Given 3 arrays - A, B and C, Write all elements from C that are a sum of 1 element from A and 1 from B.

For example -

A -[1,2,4,6]
B-[3,9]
C-[2,4,5,6,7,9,10,12,15]

Output - 4,5,7,9,15
Ans. public class MyClass {

static boolean binarySearch(int [] c, int start, int end, int value) {
while (start <= end) {
int mid = (start end) / 2;
if (c[mid] == value) {
return true;
}
if (c[mid] > value) {
end = mid - 1;
} else {
start = mid 1;
}
}
return false;
}

public static void main(String args[]) {
int [] a = new int[] {1,2,4,6};
int [] b = new int[] {3,9};
int [] c = new int[] {2,4,5,6,7,9,10,12,15};

for (int i = 0; i < a.length; i ) {
for(int j = 0; j < b.length; j ) {
int value = a[i] b[j];
boolean find = binarySearch(c, 0, c.length - 1, value);
if (find) {
System.out.print(value " ");
}
}
}
}
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


previous 30   next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: