 Good morning guys, welcome to a channel. So today we are here with one more video and in this video We'll be sharing you Genpak interview questions and these were shared by one of our subscriber friend. I Hope this video will be helpful for you in your interview preparation and all the best for your upcoming interviews So firstly, let us quickly look at the mail that we got from our subscriber friend So here is the mail. Hi here is my experience for Genpak First round selected second round is hacker rank test this week. They will conduct Most of the questions out on Java 8 features and threads. Please hide my details. Thanks for it is for five years experience So basically is the same guy. So same person same friend who has already Shared his interview experience with legato. So on the you see the heading of the main subject of the middle It says legato, but he has contributed us on One more interview experience that is with Genpak and the experience level of the candidate was five years There were two rounds by now like it is one is technical one is hacker rank so let us quickly get into the questions and Only questions were shared by the subscriber to the answer's passive part We are adding it so that it might be helpful at least for a few so coming to the first question What are terminal and intermediate operations? So basically the stream supports several operations and these operations are divided into two types that are intermediate and terminal operations The distinction between these operations is that intermediate operations are lazy while a terminal Operations are not lazy. So when you invoke an intermediate operation on a stream The operation is not executed immediately. It is executed only when a terminal operation is invoked on that stream In a in a way an intermediate operation is memorized and is recalled as soon as a terminal operation is invoked you can change multiple intermediate operations and None of them will do anything until and unless you invoke a terminal operation on that At that time all of the intermediate operations that you invoke earlier will be invoked along with the terminal Operations so basically you can change lot of intermediate operations on a stream But none of them will be executed until and unless Terminal operation is called Coming to the next question What is executor service in Java? So Java executor services construct that allows you to pass a task to Executed to be executed by thread asynchronously the executor service creates and maintains a reusable pool of threads for executing submitted tasks and there are different ways to create executable framework like services It's that that the completely depends on how you want to create Coming to the next question and before going to that Please don't forget to like and subscribe on channel if you haven't subscribed us and if you are not like this Please like the video. This will definitely contribute. This will definitely Boost the con boost the contributor coming to the next question thread How to create a thread and print one to ten sequentially using three threads? So basically a couple of questions in the single question so it's printing a Numbers from one to ten sequentially using three threads require like we can do it using notify weight methods and how to create a third that is like There are different ways to create threads using runnable implementing runnable extending thread class or we can use even executor frameworks there So we need to tell all those all those things Next question, what are the solid principles in Java? So basically solid is nothing but an acronym of single responsibility principle open close principle list code substitution principle Interface aggregation principle dependency inversion principle and we are making a separate video on this Question as well because this is the most important question for any experienced candidate. So I've already created but I haven't posted I think so very soon it will be posted on our channel do was that video as well Coming to the next question Different scopes of a bean in spring. So basically there are five single ten prototype request session global session And we have taken this answer from one of the site that we follow So basically singleton is nothing with that is the default scope of the bean prototype This scope is a single bean like whenever Any number of objects you are calling that number of many objects it will return request whenever we give a request session is One bean for the session global session. I haven't used really so the scopes of a bean definition to a global HTTP session Only valid in the context of web aware spring application context not sure on global session to be honest never worked Remaining all four things I have worked Why we need to override hash code and equals method in Java So basically we must override hash code in every class that override equals and vice versa because failure to do so will result in violation of general contract of object Like hash code method which will prevent your class from functioning properly in conjunction with all the hash code based Collection including hash map has set and hash step. So if you want to Like if you want to a hash map has table or has set These things work based on the hashing. So if you want that to work properly We need to read both hash code and equals method only overriding one method will not work and it will create Lot many problems. So this was about Hashing overriding equals and hash code method next question Activator in spring boot. So there is a separate video I think that is all recently got posted because this is also one of the frequently most asked interview question What is spring boot activator or how we configured spring boot activator or what advantages we get using spring boot activator? So activator is mainly used to expose operational information about the running application health matrices info Dump x environment details. There are many other in points that Exposes so it uses htp in points out jmx being suitable us to interact with it Once this dependency is on the class bus several endpoints are available as already said so there are different things There is a separate video which will be Added to the description as well. You can go through that as well Next question is What is atomic integer in Java, so this is a very simple question I think so atomic integer class provides an operation on underlying int value that can be read and Read and return automatically and is and also continues contains advanced atomic cooperation basically using read like get in set the methods We can make changes on this atomic integer no especially in the Multi-threaded environment. This has a huge role the next question is newly added features in Java 8 so For each method default and static method in interfaces function interfaces and lambda expression Java stream API for bulk data operations on collections Java time API Collection API improvement concurrency API improvements Java IO improvements and there is change in the memory management as well so Maybe after that he they might have asked individual questions on different things, but that was not added so Internal implementation of hash map and has set and what is hash collision? So has to go with both like in deep discussion would have Might have happened there. So if you're not aware of this This is also one of the mandatory questions for an experience get like Internal implementation of hash map has set and concurrent hash map as well So in way almost all every interview you might encounter this question if you're not aware of it, please do practice learn about Next question is sorting RL is using Java 8 so we can perform using comparator chain error or comparator. We can sort firstly we We need to convert the RL is into list or we can directly perform Stain operation on arrays as well. So there are different there might be different questions that might have been asked here so So these were the questions that were asked so here is the mail that we got so it was on 31st May 2021 and These are the questions that you can go through it like once again like what are intermediate and terminal operations? So basically the main They were like if you are preparing for Genpak interview question You must concentrate on Java 8 features and threads So most of the questions are from those two areas only like if you see what are the intermediate terminal operation? Java 8 executor services threads thread question said solid principles Scope scope of Bain by me to override hash code and equals method acuator and springboard newly added features of Java 8 atomic hint teacher internal implementation of has set hash collision sorting using Java 8 features so This was about the Genpak interview questions that were shared by our friend So if you're on our channel for the first time you can subscribe like shade provide the feedback in the comments section You can share this video to other technical platforms as well So that it might help someone who is looking for for similar kind of videos And if you are on a channel for the first time I'm wondering who are we and what we do So we are basically bunch of software engineers who attend interviews with different MNCs and share our real-time interview Experiences through these videos apart from that We also share our subscriber friends interview questions or Interview experiences that they share with us so that it might help at least few who might be looking out to prepare on what topics So these are the company names that you are seeing we have already shared you can visit our channel And you can take the advantage of the videos So what you're waiting for if you haven't subscribed Please do subscribe because there are many more videos that are going to be uploaded Which are there in the queue as we are not getting time or we are not posting it frequently and Thank you for watching Bye