Interview Questions and Answers for 'Gooddata' - 2 question(s) found - Order By Rating Frequently asked these days as there are major changes in Java 8. Q1. What are new features introduced with Java 8 ? Core Java
Ans. Lambda Expressions , Interface Default and Static Methods , Method Reference , Parameters Name , Optional , Streams, Concurrency. Sample Code for Lambda Sample Code for interface default Sample Code for Optional Sample Code for Streams Sample Code for java.time Sample Code for Predicate Sample Code for Consumer Sample Code for MapMerge Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   java8   technical lead   technical architect Asked in 14 Companies expert   frequent Related Questions Difference between final and effectively final ? Why is effectively final even required ? What is StringJoiner ? Why can't we have diamond problem with interfaces ? What is the use of Optional ? Name few "Optional" classes introduced with Java 8 ? What was the driving force to introduce default methods in Interfaces wef from Java 8 ? Is it ok to use optional everywhere just to get over nullpointerexception ? What is concurrent interface ? What is the @FunctionalInterface annotation ? Ans. With Java 8, We can provide method definitions in the Interfaces that gets carried down the classes implementing that interface in case they are not overridden by the Class. Keyword "default" is used to mark the default method. Sample Code for interface default Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   java8   default methods Asked in 7 Companies expert   frequent Related Questions Why can't we have diamond problem with interfaces ? Does java allow implementation of multiple interfaces having Default methods with Same name and Signature ? What was the driving force to introduce default methods in Interfaces wef from Java 8 ? Can we have a private default method ? If there is a conflict between Base Class Method definition and Interface Default method definition, Which definition is Picked ? Can we have a default method without a Body ? Can we have a default method definition in the interface without specifying the keyword "default" ? Can a class implement two Interfaces having default method with same name and signature ? What If we make the method as abstract in another Interface ?