Interview Questions and Answers - Order By Newest Q1871. How would you choose your favorite company name for e.g. three companies are given in radio buttons Infosys, TCS and Aricent. Do You need to loop trough all radio buttons and select your favorite company or can just get the selected value. Javascript
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   Q1872. Write code to get count of every 5 letter word in a string using lambda expression
Core Java
Ans. String str = "I had been saying that he had been there";
Map<String,Long> countWords = Arrays.asList(str.split(" ")).stream().filter(p->p.length() = 5).collect(Collectors.groupingBy(p->p,Collectors.counting()));
System.out.println(countWords); Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Collectors  lambda  filter  coding  java 8Ans. Use hashCode() which returns an integer value, generated by a hashing algorithm Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hash codes  hashcode Asked in 1 Companies Q1874. Design a class that find all files with SSN. Core Java
This question was recently asked at 'The Home Depot'.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 Q1875. Describe inheritance and polymorphism and their importance for OOP. Core Java
This question was recently asked at 'The Home Depot'.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 Q1876. Why do we need to close the Scanner ? Core Java
Ans. For releasing input stream reference (System.in), you should close scanner. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  scanner  input output  io This question was recently asked at 'Spillman Technologies,Motorola Solutions'.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 Q1878. How can we make sure that only one object of a class get's created ? Design
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 Q1879. Explain your experience working on UI ? Have you worked with JSF ?
General
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 Q1880. Have you faced any problem integrating software / services with any of your partners or vendors ? General
This question was recently asked at 'iHart'.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 Q1881. Can we capture the Request body within the interceptor or Filter and perform operations on it ? Spring
Ans. Yes, But with interceptor it will remove the body from the request and then we will have to explicitly add the attributes to the session to forward it to the handler. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  interceptor  filter Q1882. Which of the following - arrays or LinkedList allow elements to be accessed using index and how ? Data Structure
Ans. Arrays allows elements to be accessed directly using the index.
As Array elements are stored in continuous memory locations it's very easy to find the memory address of any element using the formula as following
Memory Address of Array start or index 0 + ( Size of array element * Index ) Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  linkedlist Q1883. 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   Q1884. 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 Q1885. 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 Q1886. 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 Q1887. 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 Q1888. 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 Q1889. 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 Q1890. 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 Q1891. 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 Q1892. 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 Q1893. 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 Q1894. 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 Q1895. 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 Q1896. 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 Q1897. 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 Q1898. 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 Q1899. 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 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