Interview Questions and Answers - Order By Newest 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   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   Q2253. What is the difference between developer token and refresh token ? Adwords
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   Q2254. What is the difference between accessing Google Apis using client key / secrets and service account ? Adwords
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   Q2255. What is the difference between Google Adwords and Adsense ? Adwords
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   Q2256. What is the programming advantage of Immutability ? Design
This question was recently asked at 'Overstock.com'.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  mmutable  immutability  immutabilit Asked in 1 Companies Q2257. What are the disadvantages of immutability ? Design
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  mmutable  immutability  immutabilitAns. A weak reference is a reference that gets removed on the next garbage collection cycle. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  weak reference  garbage collection Asked in 1 Companies   rare Q2259. Write a program that count the number of access to a method? Core Java
This question was recently asked at 'TrueCaller'.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 Q2260. Difference between Eager and Lazy loading in hibernate ? Hibernate
Ans. Lazy Loading is loading of entities on demand when subclass is called, while Eager loading is loading of all the sub entity at the start only.
Eager loading is fast as all sub entities are already present, but its heavy(takes more memory) Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2261. Should we have instance variables in the Spring Bean which has been scoped as Singleton ? Spring
Ans. No, if required we should only have final variables. Bean scoped singleton means that only one instance of the bean will be created and will be shared among different requests and hence instance variables will get shared too. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  singleton Asked in 1 Companies Q2262. what are the different criterions that can be specified while updating bids ? Adwords
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   Q2263. What is the difference between bid modifier and bid adjustment ? Adwords
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  Ans. public class StackUsingArrayList {
public static void main(String[] args) {
List list = new ArrayList();
list.add("A");
list.add("B");
list.add("C");
Stack stack = new Stack();
list.forEach(a -> stack.add(a));
System.out.println(stack);
}
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2265. Mention the implicit objects in jsp JSP
This question was recently asked at 'IBM'.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 Q2266. What are the ways to break singleton pattern ? Design
Ans. If we don't have double checked locking, it can be broken easily through multi threaded access.
Through Reflection.
If multiple class loaders are loading the class.
If the class is serializable or cloneable.
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  singleton Asked in 2 Companies expert Q2267. Why the singleton class should never implement Cloneable interface ? Design
Ans. Because Singleton implementation doesn't restrict it from cloning and hence we can have multiple objects when we actually don't intend it to have multiple objects. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  singleton  cloning Q2268. How serialization breaks Singleton pattern ? Design
Ans. It's not serialization but de serialization that breaks purpose of singleton as new objects can be brought to life using the serialized object. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  singleton Q2269. How Reflection can break any design pattern ? Design
Ans. Using java reflection api, we can tweak into a class and modify it's runtime behavior and hence modify the pattern it might be using. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  reflection Q2270. Can you explain following exception
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. Core Java
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  ArithmeticException Q2271. What are we doing here
list.stream().collect(Collectors.groupingBy(ClassA::getElement1,
Collectors.averagingDouble(ClassA::getelement2))); Core Java
Ans. We are averaging elements of a collection by element1 grouped by element1
* list is the reference of collection
* element1 is the member element returned by getElement1 method of ClassA
* element2 is the member element returned by getElement2 method of ClassA Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java 8  collections  java 8 streams  collectors Q2272. What will the following code return
list.stream().collect(Collectors.groupingBy(ClassA::getElement1,
Collectors.averagingDouble(ClassA::getElement2))); Core Java
Ans. Map<DataType1,DataType2> where DataType1 is the data type of element1 ( returned by getelement1 method ) and DataType2 is the data type of element2 ( returned by getElement2 method ) Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java 8  collections  java 8 streams Q2273. What is the advantage of BidDecimal over Double ? Core Java
Ans. BigDecimal provides more precision as compared to double. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  BigDecimal  Double  data types Q2274. What does @VisibleForTesting annotation denotes ? Testing
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  VisibleForTesting Q2275. What is the difference between following rounding modes
RoundingMode.CEILING
RoundingMode.DOWN
RoundingMode.FLOOR
RoundingMode.HALF_DOWN
RoundingMode.HALF_UP
RoundingMode.HALF_EVEN
Which is the one you use often and Why ? Core Java
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  RoundingMode 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 Lambda 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 lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda 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  AWS Lambda Q2279. Have you worked on creating any cron job ? Core Java
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   Q2280. Have you used any framework to capture command line arguments or options ? Core Java
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