Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Newest | ||||
![]() ![]() | ||||
| ||||
Ans. Prototype scope - A new object is created each time it is injected/looked up. It will use new SomeClass() each time. Singleton scope - It is the default scope. The same object is returned each time it is injected/looked up. Here it will instantiate one instance of SomeClass and then return it each time. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. When we create reference for primitive type, it's memory is allocated. So even if we don't assign any value to it, the default value is initialized. int x; // default value 0 initialized But for object references, it's different as references hold nothing till an object is assigned. Object obj; // contains null So all primitive types when declared , contains their respective default values on the basis of their type whereas all wrapper class References contains null irrespective of their types. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. 1. Default definition for some of the methods , like equals, hashcode etc that gets carried to all objects even if you don't define anything. But that default definition is kind of like assigning 0 to integer, it just provide a safe state , nothing much for comparison. 2. Places where you have no idea about what object you may receive and just want to perform out of 8 basic methods of object class, something like printing their string representation ( defined by their toString method ), or equality ( using their equals method ) | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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 | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Warm up time for certain technologies like Java ( JVM Warmup ) Performance Size of Deployable ( Bigger size packaging should go in S3 ) | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Java 9 would provide an error at compile time if there are different modules with the same package mapped to the same class loader and hence would provide a compile time check for this issue. NoClassDefFoundError exists because of ambiguity at realtime because of multiple versions of same package / class exist. As Java 9 would provide a compile time check for it through clearly defined dependencies and exports and a check on duplicate packages being loaded by single class loader, it will fix the problem. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Subject has state, it keeps a list of observers. On the other hand, an Observable is really just a function that sets up observation. While Subjects are Observables, Subjects also implement an Observer interface. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. 1. Design patterns are abstraction heavy and hence sometimes creates memory and performance overheads. 2. Sometimes they create unnecessary complexity without much added advantage. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. ClassNotFoundException is an exception that occurs when we try to load a class at run time using Class.forName() or loadClass() methods and mentioned classes are not found in the classpath. NoClassDefFoundError is an error that occurs when a particular class is present at compile time, but was missing at run time. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. The problem with serialized singleton class is that whenever we deserialize it, it will create a new instance of the class. To overcome this scenario all we need to do is to provide the implementation of readResolve() method. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Cloud Formation does not have any additional cost but you are charged for the underlying resources it builds. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Because it gives the ability to provision infrastructure on Demand with No contracts and strings attached. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. It saves Network traffic and facilitates faster delivery by hosting bulk media and cached data near to client. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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/*" | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Versioning ( will create Delete marker ) MFA Delete ( authentication upon deletion ) Cross Region Replication ( Replicates aren't deleted ) | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. We can select the appropriate Price Class if that suits us. We can do Geo Targeting by black listing / white listing certain geographies. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. If the computation required is Spiky and unpredictable. If it's first time use. If the lifespan of the application isn't known. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. If the usage is non continuous and have flexible start and End Time. For ex - Analysis , Research , mining etc. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. On Demand Reserved Spot Dedicated Host | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Keeping Low cost for processing , i would choose Spot Price Plan F1 or P3 Instance Type Cold Hdd (SCI ) EBS Volume | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Computation Spot Price Plan F1 or P3 Instance Type Cold Hdd (SCI ) EBS Volume Storage S3-IA | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. We can assign multiple security groups to single instance and we can use single security group with multiple instances. It never results in conflict as security groups only have allow rules and no deny rules. Multiple security groups for an instance results in union of all rules. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. No, We can do that through ACL | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. S3 is object based whereas EFS is block based. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() ![]() | ||||