Functional Interface In Java8 Explained | Java Interview Questions and Answers

preview_player
Показать описание
In this video, we covered everything about functional interfaces in Java. After watching this video, you will be able to identify if the interface is a functional interface.

#javainterviewquestions
#java8
#java
#javacoding
Рекомендации по теме
Комментарии
Автор

Thanks for the video. It will not compile since it has two abstract methods

sathiskumarp
Автор

Actually no need to mention ( ) for single variable and type that is int for lambda expression 6th Line.. as already we declared in the declaration of abstract method

vinny
Автор

you said you can have any number of default or static methods in functional interface. But only one method is allowed in FI.

everyday___life
Автор

It will throw a compilation error, on saying that SAM/Fi should consist only one abstract method.

nanisai
Автор

It will throw compilation error becz SAM consist only one abstract method

nokwydk
Автор

please upload video which explains Optional class and its methods..i face this question many times during interview and not able to explain well.

bharatimemane
Автор

As you said a functional interface should have only one abstract method..it consists of two methods.so it's not a functional interface.but I think we can compile and run the code (I'm not sure). please help me clear my doubt..

shivask
Автор

It is not compiled...throw the exception due to 2 abstract methods inside the functional interface...

SurajGunjal
Автор

Code does not compile because it has two abstract methods .

MustakMandapHalgaon
Автор

Given a string if it contains all the alphabets then print 0 else print all the remaining alphabets in order (New String).This question was came in today’s TCS mock test.Kindly please do it.

kanthichandra
Автор

it will give error
cause it has 2 abstract method sir

amarnathkumar
Автор

error
because there are 2 SAM methods in functional interface, this code will not complie

chetansinghphogat
Автор

I am studying 3rd year which language should I use in coding java or python?

nithinm
Автор

Error because there are two abstract methods

balajibalu
Автор

It won't compile since it's functional interface so we shouldn't have more than one abstract method

Vithal_Nivargi
Автор

Comparator has 2 abstract methods. 1. Compare() 2. equals() ... Still it is called as functional interface why?

MrAmogh
Автор

Functional Interface has only one abstract Method so give this code error does not compile code

rushikeshkadam