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. |
|
| ||||
Interview Questions and Answers for 'Amazon' - 304 question(s) found - Order By Newest | ||||
Frequently asked to fresh graduates and less experienced developers. Among the first few questions in many interviews. | ||||
| ||||
Ans. Composition - has-a relationship between objects. Inheritance - is-a relationship between classes. Composition - Composing object holds a reference to composed objects and hence relationship is loosely bound. Inheritance - Derived object carries the base class definition in itself and hence its tightly bound. Composition - Used in Dependency Injection Inheritance - Used in Runtime Polymorphism Composition - Single class objects can be composed within multiple classes. Inheritance - Single class can only inherit 1 Class. Composition - Its the relationship between objects. Inheritance - Its the relationship between classes. | ||||
Sample Code for inheritance Sample Code for composition | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java concepts   inheritance  object oriented programming (oops)  oops concepts   composition  object oriented programming (oops)  oops concepts   inheritance  object oriented programming (oops)  inheritance vs composition  object oriented programming (oops)  oops concepts Asked in 29 Companies basic   frequent | ||||
Try 5 Question(s) Test | ||||
Very frequently asked to Fresh graduates. | ||||
| ||||
Ans. 1.Abstraction solves the problem at design level while encapsulation solves the problem at implementation level 2.Abstraction is used for hiding the unwanted data and giving relevant data. while Encapsulation means hiding the code and data into a single unit to protect the data from outside world. 3. Abstraction lets you focus on what the object does instead of how it does it while Encapsulation means hiding the internal details or mechanics of how an object does something. 4.For example: Outer Look of a Television, like it has a display screen and channel buttons to change channel it explains Abstraction but Inner Implementation detail of a Television how CRT and Display Screen are connect with each other using different circuits , it explains Encapsulation. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   oops concepts   encapsulation  object oriented programming (oops)  oops concepts   abstraction   basic interview question   encapsulation vs abstraction Asked in 10 Companies basic   frequent | ||||
Try 2 Question(s) Test | ||||
Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. | ||||
| ||||
Ans. Underlying data structure for ArrayList is Array whereas LinkedList is the linked list and hence have following differences - 1. ArrayList needs continuous memory locations and hence need to be moved to a bigger space if new elements are to be added to a filled array which is not required for LinkedList. 2. Removal and Insertion at specific place in ArrayList requires moving all elements and hence leads to O(n) insertions and removal whereas its constant O(1) for LinkedList. 3. Random access using index in ArrayList is faster than LinkedList which requires traversing the complete list through references. 4. Though Linear Search takes Similar Time for both, Binary Search using LinkedList requires creating new Model called Binary Search Tree which is slower but offers constant time insertion and deletion. 5. For a set of integers you want to sort using quicksort, it's probably faster to use an array; for a set of large structures you want to sort using selection sort, a linked list will be faster. | ||||
Sample Code for ArrayList Sample Code for LinkedList | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  collections   java   data structures   arraylist   linkedlist   arraylist vs linkedlist Asked in 61 Companies Basic   frequent | ||||
Try 1 Question(s) Test | ||||
Very Frequently asked. Have been asked in HCL Technologies very frequently ( based on 3 feedback ). Among first few questions in many interviews. | ||||
| ||||
Ans. Abstract classes can have both abstract methods ( method declarations ) as well as concrete methods ( inherited to the derived classes ) whereas Interfaces can only have abstract methods ( method declarations ). A class can extend single abstract class whereas it can implement multiple interfaces. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   classes   abstract class   interfaces   abstract class vs interface   abstract classes vs interfaces Asked in 82 Companies basic   frequent | ||||
Advanced level question usually asked in High end product companies. Have been asked in Google and Amazon (Based on 1 Feedback) | ||||
| ||||
Ans. The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   garbage collection   java memory management   advanced Asked in 21 Companies intermediate   frequent | ||||
Try 4 Question(s) Test | ||||
| ||||
Ans. EFS is file storage whereas S3 is object storage. EFS is filesystem presented over IP network as normal OS drive, while S3 is HTTP accessed store. EFS is capable of being mounted whereas S3 doesn't. S3 has capabilities beyond just filesystem, there is whole metadata part where you can store info about your objects in S3. As S3 is accessed over http , it's capable of hosting a static web site on it's own whereas EFS needs a computing and frontend service to have such capability. | ||||
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 ehs  aws s3  aws storage  amazon cloud storage  amazon s3 vs aws efs | ||||
| ||||
Ans. AMI is an Amazon Machine Image. It contains the configuration to enable to boot up an EC2 instance with said configuration whereas Cloud formation is a templating language that allows to describe how to build a VPC and also allows you to create AWS services AMI is templating specific to instances whereas the scope of CloudFormation templating is much bigger. CloudFormation could use AMI for launching instances along with other services. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws cloud formation  aws ami  amazon ami  aws ami  amazon ami vs aws cloud formation | ||||
| ||||
Ans. CloudFront for Static Media and cached content EC2 and EKS ( Docker ) for main application computing RDS and DynamoDB for Database Lambda ( computing ) for running back end cron jobs Kinesis for streaming and SQS for queuing CloudWatch for Monitoring CloudFormation for Infrastructure templating S3 for Object Storage | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   | ||||
| ||||
Ans. A Region is a Geographical entity like US-East , US-West etc. Each Region may have multiple availability zones where each zone comprise of 1 or more Data Center located with each other. Edge Locations are the sites that hosts cached content for faster delivery and for saving network traffic as they feed content from sites that are local or near to consumption. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws region  aws availability zone  aws edge location  region vs availabillity zone | ||||
| ||||
Ans. S3 Standard S3 IA - Infrequently Accessed S3 One Zone IA - One Zone only , Infrequently Accessed S3 Glacier - achieved S3 Standard is most expensive , Glacier is least expensive | ||||
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 | ||||
| ||||
Ans. Storage Tier ( IA , Standard , Glacier etc ) Storage ( Volume of Data ) No of Requests Meta Data Data Transfer Speed acceleration through cache and Edge Location | ||||
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 | ||||
| ||||
Ans. EC2 - Time and Reservation , Instance Type ( Memory , Computation power ) S3 - Accessibility Frequency , Data Transfer , Storage Space CloudFront - Geography, No of Locations EBS - IOPS, Access Frequency | ||||
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 s3  aws storage  amazon cloud storage  amazon s3  aws cloudfront  amazon cloudfront  aws ebs | ||||
| ||||
Ans. Simple Weighted Latency Failover GeoLocation Multivalue | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws route53 Asked in 1 Companies | ||||
| ||||
Ans. A VPC is devided into multiple subnets. Subnet in a particular VPC could be public or private. For Example - A particular account may have multiple vpc's for each of the business type. For each Business or VPC , One can have different subnets to cater to each department so that access across departments could be restricted. But still there could be identities that have control over different subnets. Moreover we could have multiple subnets for each department so as to have distinguished public and private networks having different types of applications ( public facing or internal consumption ) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws vpc  aws subnet  subnet  vpc  Amazon Web Services (AWS) | ||||
Frequently asked to fresh graduates. | ||||
| ||||
Ans. Process is a program in execution whereas thread is a separate path of execution in a program. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   threads   multi threading   operating system   process vs thread Asked in 24 Companies basic   frequent | ||||
| ||||
Ans. Single instance means there is only 1 instance that will bear all the traffic load whereas Load balanced server means that there will be a cluster of servers that will host the application and load will be balanced distributed among them. Auto Scaling means that the number of instances will be expanded / shrunken based on the rule. Rule could be the traffic count , response time etc. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  load balancing  auto scaling  aws  elastic beanstalk | ||||
| ||||
Ans. Cloud Computing is a way of using IT infrastructure with following traits - 1. On Demand Infrastructure 2. Broad Network Access 3. Resource Pooling 4. Rapid Elasticity 5. Measured Service | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  google cloud platform (GCP)  Amazon Web Services (AWS | ||||
| ||||
Ans. AWS provides various types of services like Computing ( EC2 , Lambda , EKS ), Storage ( S3, Glacier ), Database ( RDS , DynamoDB ), Streaming ( Kinesis ), Queue ( SQS ), Security and Access ( IAM ) etc. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   | ||||
| ||||
Ans. Warm up time for certain technologies like Java ( JVM Warmup ) Performance Size of Deployable ( Bigger size packaging should go in S3 ) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  serverless technologies  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda Asked in 1 Companies | ||||
| ||||
Ans. Cloud Formation does not have any additional cost but you are charged for the underlying resources it builds. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws cloud formation | ||||
| ||||
Ans. In AWS Lambda we can run a function in synchronous or asynchronous mode. In synchronous mode, if AWS Lambda function fails, then it will just give an exception to the calling application. In asynchronous mode, if AWS Lambda function fails then it will retry the same function at least 3 times.If AWS Lambda is running in response to an event in Amazon DynamoDB or Amazon Kinesis, then the event will be retried till the Lambda function succeeds or the data expires. In DynamoDB or Kinesis, AWS maintains data for at least 24 hours. | ||||
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 | ||||
| ||||
Ans. A template for the instance. Launch permission decisions A block device mapping, when an instance is launched it determines the volumes to attach to that instances. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws ami  amazon ami | ||||
| ||||
Ans. Because it gives the ability to provision infrastructure on Demand with No contracts and strings attached. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Amazon Web Service (AWS)   Google Cloud Platform (GCP) | ||||
| ||||
Ans. US-East Virginia This is the oldest and most popular region. All new features are rolled first in this region and hence they are first available there. The downside is that because of experimentation with new services, unavailability time is quite high. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws region  aws us-east-1 | ||||
| ||||
Ans. It saves Network traffic and facilitates faster delivery by hosting bulk media and cached data near to client. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws edge locations | ||||
| ||||
Ans. effect means whether the effect of this Policy is to allow or deny, action means the type of action ( read , write ) and service, and resource is the resource where this should apply. For example - If we want to have a Policy of providing read access on S3 , effect will be "allow" action will be "s3:GetObject" resource will be "arn:aws:s3:::examplebucket/*" | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws iam  amazon iam | ||||
| ||||
Ans. Because new files will be fed from where ever they are first available but AWS have no way to identify which is the most updated version among the various regions. The updated version can only be assured once the replication to all availability zones is complete. | ||||
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 | ||||
| ||||
Ans. We should only allow access that's needed. So the security Policy should be as restrictive as possible. Buckets and Files should never be made public unless until they are needed it to be like that. | ||||
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 | ||||
| ||||
Ans. Versioning ( will create Delete marker ) MFA Delete ( authentication upon deletion ) Cross Region Replication ( Replicates aren't deleted ) | ||||
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 | ||||
| ||||
Ans. We can select the appropriate Price Class if that suits us. We can do Geo Targeting by black listing / white listing certain geographies. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws cloudfront  amazon cloudfront | ||||