Interview Question and Answers | Search Coding Interview Questions - 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
 Q541. Why doesn't this code give compile time error when we are clearly trying to add an integer element to an array of Strings

Object[] strArray = new String[2];
strArray[0] = 5;
Core Java
Ans. Because the reference is of Object Array and the resolution of what it holds is identified at the runtime.

String[] strArray = new String[2];
strArray[0] = 5;

would have given the compile time array as the reference is of String array.

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

   Like         Discuss         Correct / Improve     arrays


 Q542. Difference between StoreModule.forRoot() and StoreModule.forFeature() ?NgRx
Ans. forFeature is used for lazily registering reducers with the module.

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

   Like         Discuss         Correct / Improve     ngrx    angular   angular ngrx integration  ngrx store


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


 Q544. What will happen if there are no interfaces in Java ?Core Java
Ans. Abstract classes can take care of that to a certain extent. Though they are little heavier than Interfaces but An abstract class with all abstract methods and no instance variables will be able to help with everything that currently an interface does.

The only problem is that a class can only extend one class whereas it can implements multiple interfaces and that is the reason Interfaces were introduced in Java, i.e to get over the problem of multiple inheritance.

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

   Like         Discuss         Correct / Improve     interfaces      expert


 Q545. How to avoid cloning, serialization in the singleton class ?Design
Ans. For Cloning-exception,For deserialization-read.resolve()

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

   Like         Discuss         Correct / Improve     singleton  cloneable  serializable  serialization  cloning     Asked in 1 Companies


 Q546. What is the use of Amazon Glacier?Amazon Web Services (AWS)
Ans. Its a storage option provided by AWS which is even cheaper than S3. As the objects are archieved before saving, retrieval time is pretty bad.

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

   Like         Discuss         Correct / Improve     aws glacier


 Q547. What is AWS Storage Gateway?Amazon Web Services (AWS)
Ans. It's an on premise virtual appliance that can be used as cache to store s3 locally at customer site.

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

   Like         Discuss         Correct / Improve     aws storage gateway


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


 Q549. What is the use case for AWS Gateway cached , stored and VTL ? Amazon Web Services (AWS)
Ans. AWS Cached - Low Availability than AWS Stored, Lower cost than AWS Stored

AWS Stored - High Availability, High Local Storage Cost

AWS VTL - S3 Used as Back up only.


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

   Like         Discuss         Correct / Improve     aws gateway  aws gateway cached  aws gateway stored  aws gateway vtl


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


 Q551. How have you configured Security Groups ?Amazon Web Services (AWS)
Ans. AWS console >> security groups >> Create security group >> Configure security group bases on Network requirement of EC2 instance

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

   Like         Discuss         Correct / Improve     aws security group


 Q552. What is a Volume Snapshot ?Amazon Web Services (AWS)
Ans. Snapshots are point in time copies of Volume.

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

   Like         Discuss         Correct / Improve     aws ebs  aws ebs volume


 Q553. Which of the Load balancer - Application / Network provides advanced features ? What is the use of other Load Balancer than if one provides advanced feature than other ?Amazon Web Services (AWS)
Ans. Application Load Balancer is high level ( Level 7 Networking Layer ) and provides better features and flexibility than Network Load Balancer ( Level 4 Network Layer )

Network Load Balancer is turn provides better performance as it regulates raw traffic.

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

   Like         Discuss         Correct / Improve     aws elb  amazon elb


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


 Q555. What are the biggest challenges for Java technology in the coming years?Core Java
Ans. JVM - With Cloud and Serverless, this could be a hurdle for it to be preferred technology.

Confusion between OOP and Functional Programming.

Slower speed of innovation due to wider adoption.

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

   Like         Discuss         Correct / Improve     


 Q556. Difference between Base Class, Derived Class , Abstract Class and Concrete Class ?Core Java
Ans. Base Class is a relative term used to signify the Parent class in Parent - Child or Base - derived relationship.

Derived Class is a relative term used to signify the Child class in Parent - Child or Base - derived relationship.

Abstract Class is a class that is not allowed to be instantiated and hence can serve only a base class for it's usage.

Concrete Class is the class which is supposed to be instantiated and hence provide definition for all implementing interface methods and extending abstract methods.

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

   Like         Discuss         Correct / Improve     Base Class   Derived Class    Abstract Class   Concrete Class


 Q557. Difference between EFS and EBS ?Amazon Web Services (AWS)
Ans. Both EFS and EBS are block storage but EBS is reserved storage whereas EFS is On Demand.

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

   Like         Discuss         Correct / Improve     aws ebs  aws efs


 Q558. Which AWS computing service provides IAAS, PAAS , Containerization and Serverless ?Amazon Web Services (AWS)
Ans. EC2 is IAAS
Elastic Beanstalk is PAAS
EKS is Containerization service
Lambda is Serverless

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

   Like         Discuss         Correct / Improve     IAAS   PAAS    Containerization  Serverless


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


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


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


 Q562. Why AWS named the DNS service as Route 53 ?Amazon Web Services (AWS)
Ans. Route is for routing which is the purpose of DNS and Default port for DNS is 53

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

   Like         Discuss         Correct / Improve     aws route53


 Q563. What happens to backups if we delete the RDS instance ?Amazon Web Services (AWS)
Ans. Automated Backups are deleted automatically whereas Snapshots are preserved. Upon terminating RDS instance , AWS gives a warning about that and requests to create a final snapshot before terminating the instance.

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

   Like         Discuss         Correct / Improve     aws rds  aws database  amazon cloud database


 Q564. Describe best practices with respect to AWS security groups ?Amazon Web Services (AWS)
Ans. Configure it while creating EC2 instance only

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

   Like         Discuss         Correct / Improve     aws security groups     Asked in 1 Companies


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


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


 Q567. Can we have internal or private ELB as origin in cloudfront ?Amazon Web Services (AWS)
Ans. No, it should be public as cloudfront doesn't have a way to access private ELB.

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

   Like         Discuss         Correct / Improve     aws elb  amazon elb  aws cloudfront  amazon cloudfront


 Q568. Difference between NAT Instances and NAT GatewayAmazon Web Services (AWS)
Ans. High bandwidth and availability in NAT Gateway
NAT Gateway is completely managed by AWS
NAT Gateway is auto scalable
NAT Instance is just like EC2 instance and hence backed by security group
NAT Instance can be used as bastion host whereas NAT Gateway cannot be.

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

   Like         Discuss         Correct / Improve     aws nat instance  aws nat gateway


 Q569. When singleton can break and how to resolve itDesign
Ans. Deserialization. In serialization, we can save the object of a byte stream into a file or send over a network. Suppose if you serialize the Singleton class, and then again de-serialize that object, it will create a new instance, hence deserialization will break the Singleton pattern.

To overcome this issue, we need to override readResolve() method in the Singleton class and return the same Singleton instance.

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

   Like         Discuss         Correct / Improve     singleton  design patterns     Asked in 1 Companies


 Q570. why string pool concept for only String but not for StringBuffer ?Core Java
Ans. As String is immutable so by maintaining pool area we can refer the object to same area if they are with same content. But when it comes to string buffer or builder then due to mutable property if we do so then all the objects referring to that area will from now has new content.. So as to avoid this pool is present only in string.

 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: