22.Cognizant Java Interview | Java8, SpringBoot, Microservices, Stream APIs coding Question Answers

preview_player
Показать описание
In this video, we solved a problem statements using stream APIs which was asked in Cognizant Interview. The candidate had 4 Years of Experience working as a Java Developer, He answered most of the questions and got selected with CTC of 14 LPA.

For Complete Java Interview Preparation Watch this Playlist:

For complete list of stream apis coding interview questions:

#java8
#interview
#javaprogramming
#javacoding
#javainterviewquestions
#CognizantInterviewQuestions
#SpringBootInterviewQuestions
#MicroserviceQuestions

Рекомендации по теме
Комментарии
Автор

What ever code you are explaining, Can you please put on GIT and provide link of that ?
It would really helpful for all people

AdarshSingh-cuyy
Автор

hi is this domain good for freshers(as everyone is choosing web dev i want to do something different)

thunderbuddy
Автор

public class OrdersTest {

public static void main(String[] args) {

List<Orders> orders = new ArrayList<>();

orders.add(new Orders("p1", 10, 15.50));
orders.add(new Orders("p2", 5, 20.00));
orders.add(new Orders("p1", 7, 15.50));
orders.add(new Orders("p3", 3, 10.00));
orders.add(new Orders("p1", 4, 15.50));

// total revenue for product p1 // 325.5
double totalRevenue = orders.stream().filter(order ->
.map(o -> o.getPrice() *



// average quantity ordered for p1 //7.0

Double avergae = -> order.getProductId().equals("p1"),



}
}

Black_hacker-mjro