Interview Questions and Answers for 'Mp' | 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
 Q71. Can we compose the Parent Class object like this ?

class BuggyBread1 extends BuggyBread2 {

private BuggyBread2 buggybread2;

public static void main(String[] args){
buggybread2 = new BuggyBread2();
}
}
Ans. Yes.

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

   Like         Discuss         Correct / Improve     java   composition   inheritance   yesno

Try 1 Question(s) Test


  Q72. Difference between jar , war and ear ?Java EE
Ans. Jar is Java Archieve i.e compressed Class or Class / Java files.

War comprises of compressed Servlet class files,JSP FIles,supporting files, GIF and HTML files.

Ear comprise of compressed Java and web module files ( was files ).

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

   Like         Discuss         Correct / Improve     java   j2ee   jar   web development   war   ear   build management   release management     Asked in 12 Companies      basic        frequent


 Q73. What is a package and what are its advantages ?Core Java
Ans. Package is a namespace that organizes a set of related classes.

Advantages of Packages

1. Better Organization of classes.
2. Saves from the problem of duplicate names as duplicate class names are allowed across different packages.

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

   Like         Discuss         Correct / Improve     package  advantages of packages     Asked in 1 Companies      Basic


  Q74. What is a self Join and give an example of a self Join ?

or

What is self Join and What is it's purpose ?
Database
Ans. When a Table Join itself , it's a Self Join. For example - we like to know the pair of department names where first dept has lesser employees than the later.

Select D1.name , D2.name from Dept D1, Dept D2 where D1.employee_count < D2.employee_count

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

   Like         Discuss         Correct / Improve     sql  joins  self join  self-join  Pair of employee names with first having lesser salary than later  Pair of department names where first dept has lesser employees than the later     Asked in 26 Companies      basic        frequent


 Q75. What are design situations to use Singleton and Prototype Design Pattern ?Design
Ans. Both are creational design patterns.

Singleton is used when we would like to reuse an object if object is not supposed to hold request or thread specific information. Inversely Prototype is used in situations where we would like to reuse the object information but the request / thread may require it own data to be persisted.

In short, Singleton is used in situations where we can live with single object being shared across multiple requests or threads whereas Prototype is used when we need duplicate copies of objects.

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

   Like         Discuss         Correct / Improve     design pattern  singleton  prototype  creational design pattrn     Asked in 7 Companies      expert

Try 1 Question(s) Test


 Q76. Is it a good practice to use Asterick(*) in import statement to load multiple packages with single import statement ?Core Java
Ans. No, we should be lean in loading only packages which are required. Loading packages which are not being used result in memory overheads.

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

   Like         Discuss         Correct / Improve     import  import packages     Asked in 1 Companies


 Q77. What is a Webdriver ?Testing
Ans. Selenium WebDriver is a tool for automating web application testing.It helps in replicating the manual tester behavior like keyboard entry, mouse events etc and then matching the output against the expected.

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

   Like         Discuss         Correct / Improve     selenium  webdriver     Asked in 37 Companies


 Q78. Find the third last element in a linked list ?Data Structure
Ans. First Find the number of nodes in the linked list and take it as n.then find the data at n-3 element.

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

   Like         Discuss         Correct / Improve     linkedlist     Asked in 1 Companies


 Q79. What does import java.util.* means in java ? Core Java
Ans. It means import all the classes and interfaces within java.util package and make them available to use within the current class or interface. This is shorthand wild card annotation for importing all classes within a particular package. This won't import the classes within the sub packages of java.util.

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

   Like         Discuss         Correct / Improve     java import   import statement


 Q80. What is abstraction ?Design
Ans. Abstraction is a process of hiding the implementation details and describing only the functionality to the user.

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

   Like         Discuss         Correct / Improve     bstraction  oops concepts  oops principle     Asked in 22 Companies


 Q81. What are the reasons to choose between reserved and on demand instances ?Server
Ans. In terms of compute options and configurations, Reserved Instances and On Demand instances are the same. The only difference between the two is that a Reserved Instance is one you rent (reserved) for a fixed duration, and in return you receive a discount on the base price of an On Demand instance.

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

   Like         Discuss         Correct / Improve     aws  aws ec2  aws computing  amazon cloud computing  amazon ec2  production support  Google Cloud Platform (GCP)


 Q82. Can you explain the integration between API Gateway and Lambda if we wish to develop services using these tools.Amazon Web Services (AWS)
Ans. We can create API gateway and give the name of lambda function in order to be linked with lambda function, deploy the API and whenever request will be made from API it will directly be linked to lambda function to perform further process.

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

   Like         Discuss         Correct / Improve     aws api gateway  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda


 Q83. Why do we need to specify import statement ? Don't you think Java could have been designed in such a way to automatically import everything that's in the class path ?Core Java
Ans. Java could design it in such a manner but would result in ambiguity if there are multiple files with the same name. The only way to get over it to show the message when you use any such class to provide explicit import with the package prefix. The other problem could be that Java might have to change the early import to Late import and check what's being used to decide what needs to be imported as otherwise you will see errors regarding the ambiguous imports with duplicate file name.

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

   Like         Discuss         Correct / Improve     import      expert


 Q84. Does use of Final class enforces composition over Inheritance in Java ? Core Java
Ans. Yes, to a certain extent. But the objective for Final class could be beyond just enforcing composition as certain classes might have been created without inheritance or composition in mind.

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

   Like         Discuss         Correct / Improve     final class   composition  object oriented programming (oops)  oops concepts  inheritance  object oriented programming (oops)  oops concepts  composition  object oriented programming (oops)  oops concepts vs inheritance  object oriented programming (oops)  oops concepts      expert


 Q85. What would you do if you see an error thrown by a lambda function as "Access Denied" while doing something with S3 ?Amazon Web Services (AWS)
Ans. Just like people , AWS resources too have execution roles or permissions. Seems like in such a situation Lambda function may not have sufficient privileges to perform operations on S3. For example - The execution role of Lambda may just have read permissions on S3 and we may be trying to perform PutObject operation.

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

   Like         Discuss         Correct / Improve     aws s3  aws storage  amazon cloud storage  amazon s3  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda


 Q86. What are the drawbacks of using Spot EC2 instances ?Amazon Web Services (AWS)
Ans. You cannot reserve the time slot and they can be made to use whenever they are available.

AWS can Terminate the EC2 instance on their own even if it's in use.

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

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2  aws ec2  aws computing  amazon cloud computing  amazon ec2 spot


 Q87. What are the things to consider while provisioning computing in AWS ?Amazon Web Services (AWS)
Ans. Service ( EC2, Lambda etc )
AMI ( Operating System and Softwares )
Instance Type ( T,M, R etc )
EBS ( Volume Type , Size )
Price Class ( OnDemand, Dedicated etc )

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

   Like         Discuss         Correct / Improve     aws computing


 Q88. What is the purpose of EC2 Health check ?Amazon Web Services (AWS)
Ans. We can use this check for variety of things -

1. Monitoring the status / Alarms in case it's down
2. Regulating traffic to healthy instances only through Load Balancer

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

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q89. What are the advantages and disadvantages of using Lambda over EC2 ?Amazon Web Services (AWS)
Ans. Advantages -

Much Cheaper
Continuous scaling
Higher level and Serverless

Disadvantages -

Warm up time
Limited flexibility in terms of technologies
Limited control

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

   Like         Discuss         Correct / Improve     aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda  aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q90. Can we associate a single EFS volume with multiple EC2 instances ?Amazon Web Services (AWS)
Ans. Yes

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

   Like         Discuss         Correct / Improve     aws efs volume  aws ec2  aws computing  amazon cloud computing  amazon ec2


 Q91. What are the different trigger types in AWS Lambda ?Amazon Web Services (AWS)
Ans. Api Gateway
Alexa
CloudFront
CloudWatch
Code Commit
Kinesis
S3
SNS

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

   Like         Discuss         Correct / Improve     aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda trigger


 Q92. How would you secure EC2, Volume and Snapshots in Cloud ? Amazon Web Services (AWS)
Ans. Adding more security group, it works like a firewall

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

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2  aws ebs volume snapshot     Asked in 1 Companies


 Q93. What is mounting in AWS ?Amazon Web Services (AWS)
Ans. Attaching Volumes ( EBS / EFS ) on AWS Computing ( EC2, EKS )

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

   Like         Discuss         Correct / Improve     aws ebs  aws efs  aws ec2  aws computing  amazon cloud computing  amazon ec2  aws eks


 Q94. Why would a cloud customer use resources in multiple regions and zones ?Cloud Computing
Ans. 1. Fault Tolerance
2. Better Access by bringing the application closer to the users.

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

   Like         Discuss         Correct / Improve     Google Cloud Computing (GCP)  Amazon Web Services (AWS)  Availability Zones  Regions and Zones  Infrastructure


 Q95. What are system integrators in Cloud Computing?Cloud Computing
 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     Amazon Web Services (AWS)   Google Cloud Platform (GCP)


 Q96. What are transient variables in java?Core Java
Ans. Transient variables are variable that cannot be serialized.

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

   Like         Discuss         Correct / Improve     java   serialization   transient     Asked in 15 Companies      intermediate        rare


 Q97. Explain Inner Classes ?Core Java
Ans. The accessibility (public, protected, etc.) of the inner class is defined by the outer class.

Just like top-level classes, an inner class can extend a class or can implement interfaces.

Similarly, an inner class can be extended by other classes, and an inner interface can be implemented or extended by other classes or interfaces.

An inner class can be declared final or abstract.Inner classes can have inner classes, but you will have a hard time reading or understanding such complex nesting of classes.

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

   Like         Discuss         Correct / Improve     java   oops   classes   inner classes     Asked in 2 Companies      Basic        frequent

Try 2 Question(s) Test


 Q98. Why is Java considered Portable Language ?Core Java
Ans. Java is a portable-language because without any modification we can use Java byte-code in any platform(which supports Java). So this byte-code is portable and we can use in any other major platforms.

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

   Like         Discuss         Correct / Improve     java   bytecode   jvm   compiler   portable   features of java   basic interview question


  Q99. What is Comparable Interface?Core Java
Ans. It is used to sort collections and arrays of objects using the collections.sort() and java.utils. The objects of the class implementing the Comparable interface can be ordered.

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

   Like         Discuss         Correct / Improve     java   collections   comparable interface     Asked in 7 Companies      intermediate        frequent

Try 1 Question(s) Test


 Q100. Define Network Programming?
Ans. It refers to writing programs that execute across multiple devices (computers), in which the devices are all connected to each other using a network.

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

   Like         Discuss         Correct / Improve     java   network programming   distributed computing   architecture


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: