Test Java Functional Programming (Lambda & Stream) skills

Test Java Functional Programming (Lambda & Stream) skills
799 INR
Buy Now

Learning is incomplete without challengingquestions to assess the knowledge gained. There are courses and books available onFunctional Programming & Stream API, which cover these topics in detail, but simply watching the video lectures or finishing the book will not give enough confidence unless theknowledge is validated. Practice tests in this course will not only help you to assess your current knowledge of these topics but will also help you to revise the topics quickly. Questions are designed to challenge your understanding of the topics. Detailedexplanations for all the questions are alsoprovided for your reference. Functional programming is not a new concept. Lambdas were implemented in other languages much before theywere introducedin Java. Before JDK 8, anonymous inner classes with a single method was the closest Java came to functional programming but with lots of boilerplate code. If anyone wants to really appreciate the implementation of lambda expressions in java, it is necessary to know the anonymous inner classes in depth andto understand anonymous inner classyou need to have knowledge ofRegular and method-local inner classes. You may face lots of questions in interviews or written tests where you are asked to convert anonymous inner class syntax to lambda expression and vice versa. Therefore I decided to start with questions oninner classes and then go on with Lambda expression, method references, built-in functional interfacesand finally end this test series with questions on Stream API.1st practice test covers questions on: Regular Inner class: Regular inner class and its syntaxUsage of this reference with Regular inner classesShadowing of Outer class variable by Inner class variableAllowed access and non-access modifiers for Regular inner classAccessing Regular inner class’s name from within outer class and outside of outer classInstantiating Regular inner classAllowed and not allowed components inside a Regular inner classMethod-local inner class: Method-local inner class and its syntaxModifiers used with method local inner classesRelationship between method local inner class and top-level classWhere to create the instance of method local inner class?Usage of local variables with method-local inner classAnonymous inner class: Syntax of anonymous inner classInheritance and Polymorphism with anonymous inner classDefining non-overriding methods in anonymous inner classesInstance of anonymous inner class can be assigned to static variable, instance variable, local variable, method parameter and return valueAnonymous inner class extending from concrete class or abstract class or implementing an interfaceConstructors and anonymous inner classStatic nested class: Syntax of static nested classAccessing instance and static members of static nested classAllowed access modifiers with static nested classNested interface defined within a classNested interface and nested class defined within an interface2nd practice test will test, how well you know lambda expressions.2nd Practice test covers questions on: Lambda expression and its syntaxArrow (->) operatorSimplified Lambda expression syntax@FunctionalInterface annotationRequirements for an interface to be a Functional interfaceConvert anonymous inner class code to Lambda expressionthis within anonymous inner class vs this within lambda expressionUsage of local variables with Lambda expressionOnce you are comfortable with lambda expressions, then you can take 3rd practice test to assess your method references concepts.3rd Practice test covers questions on: Method reference and its syntaxDouble colon (::) operator4 types of method references: Method Reference to ConstructorMethod Reference to Static MethodMethod reference to an Instance Method of a Particular ObjectMethod Reference to an Instance Method of an Arbitrary Object of a Particular TypePossibility of ambiguous call when a method reference syntax refers to both static and instance method of the classJava 8 has provided various built-in functional interfaces, out of which 4 are most important and rest are dependent upon these 4 interfaces.4th practice test covers questions on: Supplier interfaceConsumer interface and its default method: andThenPredicate interface and its default methods: and, or, negateFunction interface and its default methods: compose, andThenComparator interface, its static method: comparing and default methods: thenComparing, reversedStream API made the life of Java developers a lot easier.5th practice test covers questions on: Generic Stream interface and its primitive counterpartsCreating sequential streamsImportant methods of Stream interfaceGeneric Optional class and its primitive counterpartsConvert arrays and collections to streamsSort a collection using Stream APIAfter Stream support in Collection API, processing collection elements became a lot easier. Parallel streams can run tasks in parallel without writing cumbersome logic.6th practice test covers questions on: Method stream() of Collection interfaceSave results to a collection using