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
 Q2431. Why line 4 in this code gives error saying "Cannot be referenced from a static context" ?

public class OuterClass {

public static void main(String[] args){
InnerClass innerClass = new InnerClass();
}

class InnerClass {

}
}
Core Java
Ans. InnerClass is a non static inner class and hence can only be instantiated using instance of the outer class.

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

   Like         Discuss         Correct / Improve     inner class


 Q2432. What will the following code print upon executing main method of Main class

public class BaseClass {

BaseClass(){
this(2);
System.out.println("Hello I am in Base Class Constructor");
}

BaseClass(int i){
System.out.println("Hello I am in Base Class int argument Constructor");
}
}

public class DerivedClass extends BaseClass{
DerivedClass(){
super(1);
System.out.println("Hello I am in Derived Class Constructor");
}
}

public class Main {

public static void main(String[] args) {
DerivedClass derivedClass = new DerivedClass();
}
}
Core Java
Ans. Hello I am in Base Class int argument Constructor
Hello I am in Base Class Constructor
Hello I am in Derived Class Constructor

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

   Like         Discuss         Correct / Improve     constructor


 Q2433. What will the following code print upon executing main method of Main class

public class BaseClass {

BaseClass(){
this(2);
System.out.println("Hello I am in Base Class Constructor");
}

BaseClass(int i){
System.out.println("Hello I am in Base Class int argument Constructor");
}
}

public class DerivedClass extends BaseClass{
DerivedClass(){
System.out.println("Hello I am in Derived Class Constructor");
}
}

public class Main {

public static void main(String[] args) {
    DerivedClass derivedClass = new DerivedClass();
}
}
Core Java
Ans. Hello I am in Base Class int argument Constructor
Hello I am in Base Class Constructor
Hello I am in Derived Class Constructor

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

   Like         Discuss         Correct / Improve     constructor


 Q2434. Why string pool concept has been introduced in string ?Core Java
Ans. Memory Sharing and Optimal memory utilization.

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

   Like         Discuss         Correct / Improve     String Pool     Asked in 1 Companies


 Q2435. Write a Program to Find the maximum sum of the sub array ?Data Structure
 This question was recently asked at 'Reddit'.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     Maximum subarray variant  arrays  sub array  subarray     Asked in 1 Companies


 Q2436. Explain In place sorting algorithm ?Algorithm
 This question was recently asked at 'Reddit,ServiceNow'.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     sorting algorithm   in place sorting algorithm     Asked in 2 Companies


 Q2437. How can we check class file format in java ?Core Java
 This question was recently asked at 'Jagan Institute of Management Studies (JIMS)'.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


 Q2438. What are the benefits of Junits ?Junit
 This question was recently asked at 'Cognizant ( CTS )'.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


 Q2439. Difference between hadoop 1.x and 2.x?Apache Hadoop
Ans. Hadoop 1.x

It supports only MapReduce (MR) processing model.
It has limited scaling of nodes. Limited to 4000 nodes per cluster.
It has single Namenode to manage the entire namespace.
It has Single-Point-of-Failure (SPOF)
Works on concepts of slots – slots can run either a Map task or a Reduce task
MR has to do both processing and cluster resource management.

Hadoop 2.x

It supports MR as well as other distributed computing models like Spark, Hama, etc
It has better scalability. Scalable up to 10000 nodes per cluster.
Works on concepts of containers. Using containers can run generic tasks.
It has Multiple Namenode servers manage multiple namespace.
YARN does cluster resource management and processing is done using different processing models.

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

   Like         Discuss         Correct / Improve     


 Q2440. Difference between group and cogroup?Apache Hadoop
 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     


 Q2441. What is the use of final String when Strings are immutable ?Core Java
 This question was recently asked at 'Cyient'.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     string     Asked in 1 Companies


 Q2442. What is Entity in hibernate?Hibernate
 This question was recently asked at 'naresh i 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


 Q2443. Can you explain spring boot project Architecture?Spring Boot
Ans. The architecture of a Spring Boot project can be divided into three layers:

Presentation Layer:
This layer is responsible for handling user requests and generating responses. It includes the user interface, which can be a web UI or a RESTful API. Spring Boot provides various options to develop web applications, such as Spring MVC, Thymeleaf, and others.

Service Layer:
This layer contains the business logic of the application. It is responsible for processing the user requests and generating responses. The Service Layer interacts with the Data Access Layer to fetch and store data.

Data Access Layer:
This layer is responsible for interacting with the database or any other external data source. It includes the database model, repositories, and data access objects. Spring Boot provides support for various data access technologies, such as JPA, JDBC, and Spring Data JPA.

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2444. Without configure ContextLoaderListenerAnd DispatcherServlet how to run spring MVCApplication?Spring
 This question was recently asked at 'Naresh i 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


 Q2445. Which angular library needs to be included for Angular Routing / Views ?Angular Js
Ans. @angular/router

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

   Like         Discuss         Correct / Improve     


 Q2446. What are the things that need to be configured for creating route / views in angular ?Angular Js
Ans. Path
View Name
Component

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

   Like         Discuss         Correct / Improve     


 Q2447. Can we have multiple path maps to the same component ?Angular Js
Ans. Yes

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

   Like         Discuss         Correct / Improve     


 Q2448. Difference between Route and Redirect ?Angular Js
 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     


 Q2449. What is type script ? What are the advantages of typescript ? How is it different than javascript ?TypeScript
 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     Typescript vs Javascript


 Q2450. Difference between constructor and NGInit ?Angular Js
 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     nginit


 Q2451. How can we give input to the component ?Angular Js
 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     


 Q2452. How can we make http sever calls from within angular ?Angular Js
 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     


 Q2453. How can we achieve 2 way binding ?Angular Js
 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     


 Q2454. What is a service class ? Angular Js
 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     


 Q2455. What is the scope of Service class ? Do we need to add it to declaration or imports or providers to be made available to the component ?Angular
 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     


 Q2456. Difference between git init and git clone ?Git
Ans. "git init" creates an empty repository or can make an existing directory a git repository while "git clone" first internally calls "git init" to create an empty git repository and then copy the data from the specified remote repository.

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

   Like         Discuss         Correct / Improve     git init   git clone   git init vs git clone      basic


 Q2457. What is the purpose of rebasing the branchGit
 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     rebasing branch in git  git  rebasing  rebase a branch


 Q2458. Define CollectionCore Java
 This question was recently asked at 'Amber Road'.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


 Q2459. Why angular apps are called single page applications ?Angular Js
Ans. In Angular Apps, route between pages are performed without rendering the entire page. Url changes are done through routing. Routing in AngularJS is implemented by including <ng-view> or <ui-view> in the index.html page without refreshing the entire page

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

   Like         Discuss         Correct / Improve     


 Q2460. What is reentrant lock ?
Ans. A reentrant lock is a mutual exclusion mechanism that allows threads to reenter into a lock on a resource (multiple times) without a deadlock situation.

 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: