Interview Questions and Answers - Order By Newest Q2131. Can we access elements at a particular index using LinkedList collection class ? Data Structure
Ans. Yes we can. But as the underlying structure of the collection class is double linked list, it will eventually have to traverse to the element linearlly and hence would result in bad performance. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2132. Can you give an example of a Get and Post Request. Web Service
This question was recently asked at 'One Click Retail,Spillman 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 2 Companies Q2133. Can you design a program that can identify if two shapes on x and y plane would intersect ?
This question was recently asked at 'Spillman 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 Q2134. Explain CAP Theorem.
This question was recently asked at 'One Click Retail'.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 Q2135. Have you heard of Rest method Patch ?
This question was recently asked at 'One Click Retail'.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 Q2136. Do you think we should have security Tokens in Url ? Design
This question was recently asked at 'One click retail'.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 Q2137. What information should be sent in url vs sent within the body in case of Post request ? Design
This question was recently asked at 'one click retail'.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 Q2138. What are the Messaging systems / technologies you have worked with ?
This question was recently asked at 'One Click Retail'.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 Q2139. What are the different delivery policies in Apache Kafka ? Apache Kafka
Ans. Exactly once , At least once , At max once Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies basic   frequent Q2140. What is your role in current project ? General
Ans. Possible Answer - Java Developer Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 5 Companies Q2141. Have you ever encoded the response before sending it back ?
This question was recently asked at 'One Click Retail'.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 Q2142. Have you ever encoded the response before sending it back from the service? If Yes , Which encoding was used ?
Ans. In two different situations I used UTF-8 and Base 64 encodings. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2143. Have you ever worked with single sign on ?
This question was recently asked at 'Accela'.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 Q2144. Can you explain JSON specification ? JSON
This question was recently asked at 'One Click Retail'.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 Q2145. Have you ever built an automation suite to test a cron job or command line application ? 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  automation testing Q2146. Can you explain filter and collectors in java 8 ? Core Java
Ans. Filters are used to filter object in stream on certail criteria. And collector is used to collect outcome of the stream. Collector is a terminal operation.
List numbers = List.of(1,2,3,4,5,6,7);
List evenNumbers = numbers.stream().filter(n -> n%2==0).collect(Collectors.toList());
The above code will filter out odd numbers and return the list of even number. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  collector  filter Q2147. Can you explain filter and collectors in java 8 ? Core Java
Ans. Filters are used to filter object in stream on certain criteria.
Collector is used to collect outcome of the stream. Collector is a terminal operation.
List numbers = List.of(1,2,3,4,5,6,7);
List evenNumbers = numbers.stream().filter(n -> n%2==0).collect(Collectors.toList());
The above code will filter out odd numbers and return the list of even number. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  collectors  filters  java 8 Q2148. Write a program that identifies numbers in a list that are palindrome and perfect square ? Core Java
This question was recently asked at 'Spillman 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 Q2149. Write a program to sort the Array of Strings Core Java
Ans. String[] s = { "sort", "string", "array" };
Collections.sort(Arrays.asList(s));
System.out.println(Arrays.toString(s)); // [array, sort, string] Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Ans. Collection is a container which is used to store and manipulate the group of objects Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2151. Get all numbers from a collection that are both perfect square and palindome Core Java
Ans. public static void main(String[] args){
List<Integer> listOfIntegers = Arrays.asList(1,2,3,4,5,6,7,8,9,10,11);
List<Integer> perfectAndPalindromeIntegers = new ArrayList<Integer>();
for(Integer i: listOfIntegers){
if(isPalindrome(i) && isPerfect(i)){
perfectAndPalindromeIntegers.add(i);
}
}
System.out.println(perfectAndPalindromeIntegers);
}
private static Boolean isPalindrome(Integer i){
String str = String.valueOf(i);
char[] charArray = str.toCharArray();
int x = 0;
int y = str.length()-1;
while(x < y){
if(charArray[x] != charArray[y]){
return false;
}
}
return true;
}
private static Boolean isPerfect(Integer i){
for(int x=2;x<3;x++){
if(x*x == i){
return true;
}
}
return false;
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2152. When to use List, Set and Map in Java Core Java
Ans. I. If we want a Collection that does not store duplicate values, then we use a Set based collection.
II. If we want to frequently access elements operations based on an index value then we use a List based collection. E.g. ArrayList
III. If we want to maintain the insertion order of elements in a collection then we use a List based collection.
IV. For fast search operation based on a key, value pair, we use a HashMap based collection.
V. If we want to maintain the elements in a sorted order, then we use a TreeSet based collection. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2153. Why do you want to leave your current job ? General
Ans. The most effective and acceptable reasons for leaving your current job should be positive e.g. moving forward in your life or career Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 21 Companies Q2154. Which spring boot version are you working with ?
Spring Boot
This question was recently asked at 'Western Governors University (WGU) '.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 basic   frequent Q2155. How is the culture at your current company ? general
This question was recently asked at 'Canopy Tax'.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 Q2156. What value you would like to see in an employee if you own a company ? General
Ans. The intent of this question is to see what values as a employee you have. So answer this cautiously as they will try to judge you on the basis of this answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies   rare Ans. The garbage collection is a facility wherein a program runs on the Java Virtual Machine which gets rid of objects, which are not being used by a Java application anymore. It is a form of automatic memory management and recollection. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 4 Companies Q2158. Can we change return type of Overridden method ? Core Java
Ans. Yes, we can change return type of overridden method in child class but child's return type should be sub-type of parent's return type. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2159. Find Intersection/union between two arrays. Core Java
This question was recently asked at 'Bristlecone,Amazon Lab126,Amazon,Microsoft,Facebook,NCR,Google'.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  arrays  code  coding Asked in 7 Companies   frequent Q2160. Find unique values between two arrays using single for loop ? Core Java
This question was recently asked at 'Net connect'.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  for loop  control statements  loop statement Asked in 1 Companies