Core Java - Interview Questions and Answers for 'Java8' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Rating

   
Rarely asked as it was introduced with Java 8.
 Q31. Difference between DoubleSummaryStatistics , IntSummaryStatistics and LongSummaryStatistics ?Core Java
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.
 Q32. What is StringJoiner ?Core Java
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(".");
strJoiner.add("Buggy").add("Bread");
System.out.println(strJoiner); // prints Buggy.Bread


 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.
 Q33. What is the use of Optional ?Core Java
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 = new ArrayList>();
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.
 Q34. Name few "Optional" classes introduced with Java 8 ?Core Java
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.
 Q35. What are the changes in Java.io in Java 8 ?Core Java
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


 Q36. Name few Java Util classes introduced with Java 8 ?Core Java
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.
 Q37. Name few java.lang classes introduced with Java 8 ?Core Java
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.
 Q38. What is DocLint in Java 8 ?Core Java
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.
 Q39. What are the errors identified by DocLint ?Core Java
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.
 Q40. Which keyword specify that a variable is effectively final ? a. final b. No Keyword c. Both of the above d. None of the aboveCore Java
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.
 Q41. Which of the following has been introduced with Java 8 ? a. StringBuffer b. StringBuilder c. StringFilter d. StringJoinerCore Java
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


previous 30   

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: