Interview Questions and Answers - Order By Newest Q2171. 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 Q2172. Can we create object in static block ? Core Java
This question was recently asked at 'DXC 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   Asked in 1 Companies Q2173. What are the different ways to create objects in Java ? Core Java
Ans. 1. Using new operator
3. Using Class.forName or Reflection
4. Using clone
5. Using Deserialization Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2174. What will happen if there are no collections in java ? Core Java
Ans. Collections in Java is nothing but a library implementation for data structures and algorithm. If it's not available , we might have to include some other library or provide our own implementation. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  collections This question was recently asked at 'SQUAD Infotech'.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  stream  inout output  inour stream Asked in 1 Companies Q2176. How to calculate distance between 2 points using latitude longitude ? Algorithm
This question was recently asked at 'Trimble'.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   Asked in 1 Companies Q2177. How to parse nested json object ? JSON
Ans. JSONObject jsonChildObject = (JSONObject)jsonObject.get("LanguageLevels");
for (Map.Entry in jsonChildOBject.entrySet()) {
System.out.println("Key = " entry.getKey() ", Value = " entry.getValue());
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  json  nested json Asked in 1 Companies Q2178. 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 Q2179. 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) Ans. 10000 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws cloudfront  amazon cloudfront Q2181. Which is the best approach that provides the lowest cost for Amazon elastic block store snapshots while giving you the ability to fully restore data? aws ebs
Ans. Maintain the most current snapshot; archive the original and increment to Amazon Glacier. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws ebs volume snapshot Q2182. 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 This question was recently asked at 'Unisys'.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   Asked in 1 Companies Q2184. Explain Spring mvc. Spring
This question was recently asked at 'Esoft Services'.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   Asked in 1 Companies Q2185. Which IAM policy condition key should be used if you want to check whether the request was sent using SSL? Amazon Web Services (AWS)
Ans. AWS: secure transport Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws security  aws iam  amazon iamAns. IPv4 and IPv6 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Elastic Load Balance  AWS Load balancing  aws elb  amazon elbAns. Controller Service Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  AWS Controller Service  aws elb  amazon elb  aws load balancing  elastic load balancerAns. 20 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  EC2  aws ec2  aws computing  amazon cloud computing  amazon ecAns. 99.999999999% 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 s3Ans. AWS now allows file upto 5GB in S3 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 s3Ans. Yes 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 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 s3  aws storage  amazon cloud storage  amazon s3Ans. Geo Targeting will the users country of origin and pass along with country code to you in the cloudFront viewer country header. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws cloudfront  amazon cloudfront Q2194. 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 Q2195. 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 Q2196. What are the different types annotations used in TestNG? TestNG
This question was recently asked at 'VMWare'.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   Asked in 1 Companies Q2197. How do we achieve parallel execution in TestNG? TestNG
This question was recently asked at 'VMWare'.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   Asked in 1 Companies Q2198. How do we include and exclude the groups in the TestNG xml file? TestNG
This question was recently asked at 'VM Ware'.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   Asked in 1 Companies Q2199. what is the testcase technique Testing
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   Asked in 1 Companies Q2200. what are the different status of a defect in Jira ? Jira
Ans. Open, In Progress, Reopened, Closed, Resolved Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies