Wipro Java 8 coding questions with answers | Java 8 tricky Interview Questions |
Вставка
- Опубліковано 2 жов 2024
- this video contains Java 8 Coding Questions and answers that were asked as part of wipro interview.
Wipro Interview Experience : • wipro java interview q...
One of the best book for Interview Questions
Top 1000 Java Interview Questions & Answers: Includes Spring, Hibernate, Microservices, GIT, Maven, JSP, AWS, Cloud Computing @ amzn.to/32zFihe
Best Laptops : amzn.to/33rBT4A
Best Software's : amzn.to/3h9TTbw
📌 Do Subscribe for all Updates.
Telegram : Drunken Engineer
t.me/DrunkenEn...
You can follow us on Facebook :
/ drunkenengineer8
Feel free share your Interview Experience with us @ funnytechiees@gmail.com
#java8 #codingquestions#programmingquestions #interviewquestions #programming #wipro #interviewquestions #java #coding #realtime #questionsandanswers #technical #programming #solutions
Could you please share code.
//program to print Max/Min employee salary from the given collection
Optional higestEmployee = employeeList.stream()
.collect(Collectors.maxBy(Comparator.
comparingDouble(Employee::getSalary)));
System.out.println(higestEmployee);
Optional lowestEmployee = employeeList.stream()
.collect(Collectors.minBy(Comparator.
comparingDouble(Employee::getSalary)));
System.out.println(lowestEmployee);
System.out.println("=============================");
//program to print the max salary of an employee from each department
Map output = employeeList.stream()
.collect(Collectors.groupingBy(Employee::getDepartment,
Collectors.reducing(BinaryOperator.maxBy(Comparator.
comparing(Employee::getSalary)))));
output.forEach((key,value)-> System.out.println(key + value));
System.out.println("=============================");
//program to print active and inactive employees in the given collection
Map activeInactiveCount = employeeList.stream()
.collect(Collectors.
groupingBy(Employee::getActive,Collectors.counting()));
activeInactiveCount.forEach((key,value)-> System.out.println(key + value));
//program to print employee details working in each department
System.out.println("=============================");
Map empDept = employeeList.stream()
.collect(Collectors.groupingBy(Employee::getDepartment));
empDept.forEach((key,value)-> System.out.println(key + value));
//program to print employees count working in each department
System.out.println("=============================");
Map empDeptCOunt = employeeList.stream()
.collect(Collectors.groupingBy(Employee::getDepartment,Collectors.counting()));
empDeptCOunt.forEach((key,value)-> System.out.println(key + value));
@@DrunkenEngineer program to print second maximum salary of employee
Thanks for this video but the voice sound is very slow in it.
Thanks for the feedback Kaushal, will work on it.
thanks team. Wonderful job.
Waiting for more experienced interviews, like 8+ years. This is the most useful UA-cam channel.
Thank you very much !!!
Hope it is helpful😊
@@DrunkenEngineer It is I totally appreciate yours and teams hard work and investing amount of time for creating useful content for viewers like me..I don't how to thank you all
Below also works
Employee e5 =list.stream().max(Comparator.comparing( (Employee e) ->e.getSalary())).get();;
what if more than 2 employee with same highest salary??
Thanks !!🔥
Thanks for the information
Bro.. I got a question, is it possible to get 25LPA hike? Which company wil gv tht much?
I have 5.10 years experience as a java backend developer but current CTC is 7LPA..
It is very much possible, if you have hands on experience on the latest technologies.
@@DrunkenEngineer so java and spring boot is not latest technology for greater hike?
90% of Java developers know Java and Springboot.
Why will it make you pay higher package?
empList.stream().collect(Collectors.partitionBy(e -> e.getActive() == 'isActive))): it returns map with active employelist and inactive employelist