Java 8 Stream API and String | Capgemini Mock L1 Coding Interview

preview_player
Показать описание
Capgemini Java Coding Round. The candidate has 3.8 years of experience and he got selected in the interview. In the interview, the question was about Java streams API and String.

Question 1:
There is a list of employees and the candidate needs to increase the salary of the employees by 10% whose age is greater than 25 years.

Question 2:
String comparison using literals and new String constructor.

Freshers Java Interview Questions
Experienced Java Interview Questions

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

I am so happy to have found your channel! This video was exactly what I needed today. You have a wonderful, calming way about your teaching. Thank you for taking the time to make these

alphalearninghub
Автор

Good one. I work for a German defence project and got opportunity to sharpen my Java skills.

venkatarr
Автор

Piece of cake, even a fresher could have cleared it

mankindsangel
Автор

Great to see candidate is so excited for Capgemini..my favourite company 👍

javascriptduniya
Автор

I am 3 months experience, I dono about streams, but last parts were easy enuf

proxy
Автор

Easy peasy, it should be for a fresher.

santanumukherjee
Автор

This makes sense in sql. In java he could have asked some logical question.

enigma
Автор

you saved me a lot of time looking for a working crack

carlacosta
Автор

in real interviews.. they will ask take linked list keep in mirror and cut one node in it .. find out the shortest path between two nodes .. lol :) .. it was terribles . For me they asked to me write satellite code

harishreddy
Автор

First of all I would prefer not violate OCP.
We have to add interface or abstract class Employee and declare method increaseSalary(). Than we have to put increasing salary logic there. With that we can iterate over list of employees and call increaseSalary() without any logic in map lambda that actually violates OCP.

Second comment is not to use anythng except BigInteger for money. You can see in current solution have errors are accumulated.

HarryHoudiny
Автор

Strings questions are very essy even fresher can answer

Saikumar_Miryala
Автор

I could have used filter() method to filter the Age and then Map() to do the calculations that would be more Java 8

prakashsingh-hshn
Автор

It's kind of very easy round it should be for freshers.

abhinavpandey
Автор

Use filter 7:10 instead of if condition inside map

Azhagusuryaa
Автор

NYC keep uploading more vedios on Java 8 interview coding questions

raghavendrac
Автор

how many years of experience this guy have ? or was he fresher?

btw wonderful video, will surly help!!

_kunaltilekar
Автор

why did not you use filter first for age then map instead of if condition

rohatgianu
Автор

That was easy. What is the salary PKG? I guess it will be less.

animeshrose
Автор

Can you please tell me for 2 years of experienced candidates what are the selection rounds generally happens from the Scratch after application shortlisting ....

sunetramukherjee
Автор

Solution provided for employee is not an ideal solution.
1. Filter should be used for the age comparison
2. And new employee object should have been created for the updated salary. Since Immutability should be maintained

bestAnkitAgarwal