Java 8 new features || Java 8 Interview Questions and Answers ( Live Demo with Examples )

preview_player
Показать описание
In this video, you'll learn about Java 8 new features and Java 8 Interview questions and answers and explanations with live demo and working examples

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

Java 8 Interview Questions Complete Playlist :

There are lots of new features which were added in Java 8. Here is the list of important features which are mostly asked as java 8 interview questions:

Lambda Expression
Stream API
Default methods in the interface
Functional Interface
Optional
Method references
Date API
Nashorn, JavaScript Engine

Main advantages of using Java 8?
More compact code
Less boilerplate code
More readable and reusable code
More testable code
Parallel operations

Interview question on java 8 Lambda expressions is a very commonly asked question :
Lambda expression is an anonymous function ( without name, return type and access modifier and having one lambda symbol )

Functional interfaces are those interfaces which can have only one abstract method .

It can have static method, default methods.

There are many functional interfaces already present in java such as eg : Comparable, Runnable

How lambda expression and functional interfaces are related?
Lambda expressions can only be applied to abstract method of functional interface.

As we know Functional interface is an interface with Exactly One Single Abstract method and can have multiple Static or default methods.

To create our own Functional interface, You can do following steps:
Create An interface
Annotate that with @FunctionalInterface.
Define exactly one Abstract method.
There is no restriction on number of static and default methods defined in such and interface.

Java can implicitly identify functional interface but still you can also annotate it with @FunctionalInterface . It just give you the security that in case if u by mistake add 2 abstract methods then Compiler will throw compile time error.

Method Reference :
EG : MethodReferenceDemo and FunctionalInterfaceDemo

Method reference is replacement of lambda expressions. It is used to refer method of Functional interface to an existing method. Mainly it is used for code reusability.

Functional Interface’s Abstract method can be mapped to specific existing method using double colon operator (::) . This is Method reference.

Hence Method reference is an alternative to Lambda expressions.

Whenever we have existing Implementation of Abstract method of our Functional interface then we can go for method reference. If no such method like testImplementation() is available then go for lambda expressions.

-------------------------------------------------------------------------------------------------------------------------------------

Code Decode Playlists

-------------------------------------------------------------------------------------------------------------------------------------
Subscriber and Follow Code Decode

--------------------------------------------------------------------------------------------------------------------------------------
#JAVA8 #JAVA8InterviewQuestions #JAVAInterviewQuestions #codedecode
Рекомендации по теме
Комментарии
Автор

Top Notch Videos...Showing Implementation along with the presentation is the best thing I like about your videos.

navy
Автор

you guys helped me a lot in my interviews . Never ever stop this . Its gold

neelabhrai
Автор

Thanks 😊
Probably the best video on Java 8 new features.
Perfectly explained each and everything with excellent communication skills 👏.
YOU ARE A GEM TRAINER 💎

sunnyjain
Автор

Hi Mam
I have cracked interview with respected service company and your videos are really helped me lot.
Thanks you so much.

ishantsharmaa
Автор

Thank you so much for your video contributions…. I’m the one who commented earlier that I’m watching your video like Illayraja music… now I’m happy to share that I cracked and have offers with 2 companies…. Graduated as computer engineer recently… but cracking interviews are something beyond what we learn…. Thank you thank you thank you so much 🙏🏻🙏🏻🙏🏻

anusathiya
Автор

Form 18:14 to 18:39. the moment when I can't resist hitting the like button :) nicely explained Method reference.

rohitsharma-xtqe
Автор

This video is very helpful to brush-up the Java 8 features. Kudos to the instructor and team, very simple and good presenation.

sreeharir
Автор

Thanks for sharing the knowledge with millions around the globe. I am really impressed with your way of teaching and knowledge on the subject. Detailed explanations and straight to the point, and with practical examples/implementations. I have watched all the videos in this playlist and learned so many new concepts.

samsonrj
Автор

I want to see the picture of a great lady who explains these videos very clearly. give big applause

venkatesha
Автор

Ma'm i would really like to thank you from the bottom of my heart .This is increasingly helping me in gaining my confidence for the interview. Please keep uploading .

shubhamkumar-gwvb
Автор

Thank you so much for explaining the difference between Lambda & method reference clearly, i was waiting for this type of explanation for so long. thank you :)

kiranmaiganadi
Автор

I would like to thank for the amazing work of yours and it would be so helpful if you have added a video only on the java 8 features involving the implementation for predicate biconsumer and all other with detailed explanation.

Thanks....!!!

suryakalyan
Автор

You are extremely good. These videos are helping us to understand basic concepts. A big thank you to you and your team. Request you to make videos on multithreading, microservices, sql querries interview questions.

amrutadeo
Автор

Thank you so much for giving these concepts easily in hand. Finally today I understood method reference which was never clear before .

palanesami
Автор

Hi, just started following your videos, want to complement you, your way of explanation is very crisp and clear which helps in understanding very quickly.

shubhisharma
Автор

Extremely helpful and one of the most important channels on youtube 👍🏼👍🏼👍🏼👍🏼

ashwinisarode
Автор

Thank You so Much for making this video's mam... Really usefull

lokeshchandra
Автор

You are an amazing tutor... Thanks for the clear explanation 🤗

akshkaur
Автор

No words...Covered much with clear explanation in less time

pradeepkumar-zpmv
Автор

Thankyou so much for taking time and explaining in such detail. Anyone can learn programming if teachers like you are here :)

deepikaganesh