Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Rating | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. They all does the same task i.e to compute statistical information on the stream of data. They differ by the way they store the statistical information as they expect a different data type of the values being used. IntSummaryStatistics and LongSummaryStatistics expect non floating point values and hence stores the statistical information like min,max and sum as non floating values ( int or long ) whereas DoubleSummaryStatistics stores these information as floating value. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   java 8   lambda expressions   doublesummarystatistics   intsummarystatistics   longsummarystatistics   summarystatistics | ||||
Not frequently asked as it was introduced with Java 8. | ||||
| ||||
Ans. StringJoiner is a util method to construct a string with desired delimiter. This has been introduced with wef from Java 8. Sample Code StringJoiner strJoiner = new StringJoiner("."); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   java 8   string   stringjoiner | ||||
Not frequently asked as it was introduced with Java 8. | ||||
| ||||
Ans. Optional is a good way to protect application from runtime nullPointerException in case the the absent value has been represented as null. So basically Optional class provides the type checking during compile time and hence will never result in NPE. For ex - List intList.add(Optional.empty()); intList.add(Optional.of(new Employee("abc"))); intList.add(Optional.of(new Employee("xyz"))); intList.add(Optional.of(new Employee("123"))); System.out.println(intList.get(0).getName()); So Now , even when the first list element is empty, this code will never throw an NullPointerException. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   java 8   optional | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. http://www.buggybread.com/2015/01/java-optional-classes-and-interfaces.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   optional   java 8   java8 | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. http://www.buggybread.com/2015/01/migrating-to-java-8-new-classes_62.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java 8   java.io   java8 | ||||
| ||||
Ans. http://www.buggybread.com/2015/01/migrating-to-java-8-new-classes_25.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java.util   util   java 8   java8 | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. http://www.buggybread.com/2015/01/migrating-to-java-8-new-classes.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java.lang   java8   java 8 | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. DocLint Provide a means to detect errors in Javadoc comments early in the development cycle and in a way that is easily linked back to the source code. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java 8   doclint   java8 features | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. Bad syntax, such as unescaped characters or unmatched parentheses Bad HTML, such as invalid or missing tags or attributes Bad references, such as referencing a non-existent type with @see Accessibility errors, such as a missing summary or caption from a table Missing info, such as an undocumented parameter | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   java 8   doclint | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. No Keyword | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java 8   java8   final   effectively final   rare | ||||
Rarely asked as it was introduced with Java 8. | ||||
| ||||
Ans. StringJoiner | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   java 8   string   stringjoiner | ||||