Optional in java 8 | Null check in java 8

preview_player
Показать описание
Hello,
Welcome to this channel, This Channel is mainly designed to focus on improving software Engineers existing skills and enhance their Interview skills,
This Channel is for both Freshers and experience who wants to get job or want to groom their existing skills.
About This Video : -
Also use of isPresent() in the same program.
We have performed Stream on Array and printed employee information related to company.
#java8Tutorial #nullCheckInJava8 #ispresentVsIfpresent

Please Subscribe this channel
Please Like This video and share this Video

Thank you!
Комментарии
Автор

You are one of the few that shows ifPresent and isPresent in a Collection using Optional. Others are just using Strings or Integers. This is the real stuff. Thanks

alfredabate
Автор

Good job mate.. can you please explain how can i handle orElse case in java 8? Is there any way without traditional if else?

srikanthk
Автор

Could you please show how to do code coverage using mockito for this Optional case?

shoaibahmed
Автор

ArrayList<String> list=new ArrayList<>();
list.add("Mango");
list.add("Apple");
list.add("Banana");
list.add("Grapes");

Optional<ArrayList<String>>

list1.filter((item)->{ System.out.println(item); return true;}) or ist1.map((item)->{ System.out.println(item); return item;})

is there any way with filter and map of optional to iterate one by one on array element when i using this it returning me the whole array.

goku
Автор

Tell what is the difference clearly bro

anandreddy