Interview Questions and Answers - Order By Rating      Ans. 5 mins for Standard / Basic 
1 min for Detailed / advanced   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws cloudwatch  amazon cloudwatchAns. CPU, Disk, Network, Status   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws cloudwatch  amazon cloudwatchAns. Only Basic not advanced   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws cloudwatch  amazon cloudwatch  This question was recently asked at 'Cognizant (C?TS),Overstock'.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        aws rds  aws database  amazon cloud database      Asked in 2 Companies Ans. CloudWatch   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 cloudwatch  amazon cloudwatchAns. Route 53   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        AWS DNS  aws Route 53      Asked in 4 Companies Ans. Through Snapshots   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws ebs  aws volumes  aws computationAns. RDS, RedShift and Elastic Cache   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws automated backups  aws RDS  aws Redshift  aws backupAns. 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 vtlAns. Disaster Recovery and availability   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 s3  aws storage  amazon cloud storage  amazon s3 cross region replication  Q131. Which AWS services would you use if you have find a cheapest solution for an analytics application ?  Amazon Web Services (AWS) 
Ans. Computation  
 
Spot Price Plan 
F1 or P3 Instance Type 
Cold Hdd (SCI ) EBS Volume 
 
Storage 
 
S3-IA   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws computation  aws ec2  aws computing  amazon cloud computing  amazon ec2Ans. If there are regulatory requirements, or proprietary license to be used.   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 dedicated hostAns. 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 gatewayAns. AWS CloudWatch   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws cloudwatch  amazon cloudwatchAns. 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 locationsAns. As Edge location only host cached content, Amazon CDN service or CloudFront is provided on these locations.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        aws edge location  aws cloudfront  amazon cloudfront  aws cdnAns. 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 zoneAns. 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)   Q139. How did you use Spring in your project ? Which Spring annotations have you used in your project ?  Spring 
Ans. @RequestMappping   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        spring  spring annotations      Asked in 1 Companies 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  Q141. If you have to pull a sub string out of a string, which method would you use - using String methods or Pattern / Matcher ?  Design 
Ans. It depends on how complex it is and if in future it would need any sort opf debugging. It's not easy to debug code if it's making heavy use of shortcuts like Lambda , Patterns etc.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        pattern matching  String  design  Q142. Can we serialize objects with only private variables in Java ?  Core Java 
Ans. It depends on how we are serializing. The Serialization API doesn't worry about private variables and convert it into binary representation. 
 
If we are using a library to map it to JSON / XML using XML Mappers, it may create trouble.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        serialization  Q143. Pascal Triangle Program  
Ans. package snippet; 
 
import java.util.ArrayList; 
import java.util.Arrays; 
import java.util.HashMap; 
import java.util.List; 
import java.util.Map; 
 
public class Pascal { 
   public static void main(String[] args) { 
 
      System.out.println(generatePascalTriangle(5)); 
 
   } 
 
   static Map> generatePascalTriangle(int size) { 
      Map> triangle = new HashMap<>(); 
 
      triangle.put(0, Arrays.asList(1)); 
      triangle.put(1, Arrays.asList(1, 1)); 
 
      for (int i = 2; i <= size; i  ) { 
         List coeffListForI = new ArrayList<>(); 
         List coeffListForI_1 = triangle.get(i - 1); 
         coeffListForI.add(1); 
         for (int j = 0; j <= coeffListForI_1.size() - 2; j  ) { 
            coeffListForI.add(coeffListForI_1.get(j)   coeffListForI_1.get(j   1)); 
         } 
         coeffListForI.add(1); 
         triangle.put(i, coeffListForI); 
      } 
 
      return triangle; 
   } 
}   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 8 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  Q145. What is elasticity in relation to Cloud infrastructure ?  Cloud Computing 
Ans. The power to scale computing resources up and down easily with minimal friction   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)   Q146. Explain different inheritance mapping strategies with JPA / Hibernate.  Hibernate 
Ans. table per hierarchy 
table per concrete class 
table per sub class   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        hibernate mapping  hibernate associations      Asked in 4 Companies   Q147. 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   Q148. Implement a Stack with 2 threads in which one thread push data and another pop data.  Data Structure 
  This question was recently asked at 'HCL 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        stack      Asked in 1 Companies   Q149. Does it make sense to mock integration calls during stress / load test ?  Testing 
Ans. No, its usually not done.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        integration testing  stress testing  mocking  Mockito  Q150. Explain Hibernate caching mechanism  Hibernate 
Ans. Every fresh session having its own cache memory, Caching is a mechanism for storing the loaded objects into cache memory.  The advantage of cache mechanism is, whenever again we want to load the same object from the database then instead of hitting the database once again, it loads from the local cache memory only, so that the no. of round trips between an application and a database server got decreased.  It means caching mechanism increases the performance of the application. 
 
In hibernate we have two levels of caching 
 
First Level Cache [ or ] Session Cache 
Second Level Cache [ or ] Session Factory Cache [ or  ] JVM Level Cache   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 23 Companies