I applied for one position with EPAM.
First I had 30 mins discussion with its recruiter then next day 90 mins technical discussion
was scheduled with its panel named some 'G* Verma'.
Initially interviewer was reluctant to share his video also, but after 2-3 mins discussion he got
agreed to come one video for this video meet.
He checked about various areas like-
1) Agile vs Kanban
2) Saga Design pattern
3) Java Design patterns
4) IdentityHashMap
5) Spring aware classes
6) Spring Security
7) JWT structure & purpose
8) Kafka
9) Cloud
10) CI/CD pipeline
11) Find the 5th Highest salaried employee from Employee table in database.
12) 1-2 questions about DB concepts
13) Find the problem in the given code having lambda expression
14) Below code is given-
method(Customer cust) {
if(cust == null)
throw new Exception();
else
callAnotherMethod();
}
Now convert this if else block to one liner using java8 feature.
I suggested to use Optional but I was not able to recall the API properly & I was also not in
favor of Optional just for this case.
And one has to decide for this, as readability & maintanability needs to be considered before
making the code too concise.
Here, if you have lot of such checks before you can execute your main logic then better
use assert, if having only one such if condition then better leave it like this.
But if you want to start some other process if condition fails then can use Optional like shown
below-
First I had 30 mins discussion with its recruiter then next day 90 mins technical discussion
was scheduled with its panel named some 'G* Verma'.
Initially interviewer was reluctant to share his video also, but after 2-3 mins discussion he got
agreed to come one video for this video meet.
He checked about various areas like-
1) Agile vs Kanban
2) Saga Design pattern
3) Java Design patterns
4) IdentityHashMap
5) Spring aware classes
6) Spring Security
7) JWT structure & purpose
8) Kafka
9) Cloud
10) CI/CD pipeline
11) Find the 5th Highest salaried employee from Employee table in database.
12) 1-2 questions about DB concepts
13) Find the problem in the given code having lambda expression
14) Below code is given-
method(Customer cust) {
if(cust == null)
throw new Exception();
else
callAnotherMethod();
}
Now convert this if else block to one liner using java8 feature.
I suggested to use Optional but I was not able to recall the API properly & I was also not in
favor of Optional just for this case.
And one has to decide for this, as readability & maintanability needs to be considered before
making the code too concise.
Here, if you have lot of such checks before you can execute your main logic then better
use assert, if having only one such if condition then better leave it like this.
But if you want to start some other process if condition fails then can use Optional like shown
below-
Optional usage
Otherwise I will prefer to stick to simple if-else here, but as I said earlier if you are having
multiple various checks before your actual business logic kicks in, then can have like-
multiple various checks before your actual business logic kicks in, then can have like-
Assert
Ultimately, your target should be to make the code readable & efficient, not making the code concise.