 Welcome to our channel so today in this video we will be sharing this Siemens Java interview questions for experience and this video is shared by one of our subscriber friend. So if you are looking out for the questions that are being asked at Siemens then this video will definitely help you out and we are also like the subscriber friend as well so share the answer as well so it will definitely benefit you. So firstly let us see the mail that we have received from Shubham so Siemens Java interview questions high team this is Shubham one of your subscribers you are doing great job so I have also wanted to contribute. Interview with Siemens experience is for four two technical rounds and one one manager round happened attachment contains the interview question and answers asked in the first round of the interview very soon we will be sending the second round and manager round interview questions as well please upload this it took a lot of time to time to type the questions and type the question and answer note the first round coding questions were very simple so didn't shake please hide my idea so this was the mail so so before getting into the questions part let us talk about two problems that lot of our subscriber friends face one how to get interview calls as a fresher and two stuck with small companies and coming to the space freshers the jobs are very hard to come by because of covid currently and secondly many times candidate miss out a job opportunity because they don't have a better degree or had a poor network so these are the two reasons that freshers are not getting jobs these days and second one stuck small companies so here we found a solution for these two problems and that solution is one platform called ReLevel let's quickly visit that platform and see what it is offering for us so this is the platform guys ReLevel so ReLevel is India's first hiring torment platform it is really helpful for freshers and early stage career individuals as it has more than 500 plus positions plus 50 plus companies already associated with it currently and believe me this number is going to shoot up very soon here even as a fresher and even being from a very small college you can get a package of two 15 plus slacks per annum it just completely pure your based on your pure talent and skills which will be considered here and if you can scroll down and see or you can have the list of company names that are already associated with this platform so you can see RazorPay, Urban Company, Upgrad, Web Engage, a lot of things 5% and a lot many links a lot many other companies are there so how to apply so here you can see there are three popular tournaments that is business development front-end development back-end development so according to your will according to your choice you can register in any one of the tournament and you can apply our coupon code which is there in the description to get 10% extra discount here and very important thing here is the registration closes on 22nd June 2021 and the tournament begins on 26th June 2021 and few important things that I would like to share here the tournament is not related to like restricted to BE, BTEC or MBA anyone can register and participate in the tournament and the investment that is 1799 after coupon is applied will be the best investment of your life there are three tournaments as you can see and in each tournament there will be two rounds one will be prelims and other is mains and upon clearing the mains you will be getting a mentoring session this is this is very important that you will be getting a mentoring sessions from the re-level team to help you with clearing the company interviews so what are you waiting for register participate in the tournament and get the offer so this to come into the first question how locking mechanism is implemented by JVM so the answer is this answer was shared by our subscriber friend itself the implementation of locking mechanism in Java specific to the instruction set of Java platform for example with Java with x86 it might use the CMP XCHG automatic compare and exchange at the lowest levels to implement the first part of the lock the CMP XCHG instruction is compare and swap instruction that guarantees atomic memory access to the hardware level if the thread cannot acquire the lock immediately then it could spin lock or it could perform is is called to schedule a different thread different strategies are used depending upon the platform JVM switches so this was about the first question coming to the second which event bus is used by saga pattern when we use event-based communication a microservice publishes an event when something notable happens such as when it updates a business entity or anything other microservices subscribe to those events when a microservices when when a microservice receives an event it can update its own business entity which might lead to more events being published this published subscribe system is usually performed by using an implementation of event bus the event bus is designed as an interface with the API needed to subscribe and a subscribe to events to publish the event the implementation of this event bus can be a message you like rabbit mql service bus like a shoe service bus this was about the second question the event bus her question why should we use thread full executor when we have executor framework so here is the source code of executor.newfixed.threadful that is you can see the code it will return thread pull executor threads and it is using linker block queue so this method uses thread pull executor class which uses default configuration as seen in the above code now there are scenarios where default configuration is not suitable say instead of linked blocking queue a priority queue needs to be used etc there can be any scenarios in such cases caller can directly work on the underlying thread pull executor by instant stating it and passing the desired configuration to it this was about thread pull executor coming to the next question what is the difference between at the spring boot application and at the red enable auto configuration following are the differences between at the spring boot application and at the red enable auto configuration availability coming to availability spring boot application was introduced in version 1.2 while at the red enable auto configuration was introduced in 1.0 purpose enable auto configuration enables auto configuration feature of spring boot application which automatically configures things if certain classes are present in class path example it can configure like it can configure template resolver and view resolver if family is present in the class path on the other hand at the red spring boot application does three things it allows us to run the main class as a jar with the embedded container like web server web server Tomcat it enables Java configuration it enables component scanning this was the differences between spring boot application and at the red enable auto configuration what happens when we call spring boot application dot run method in main class of spring boot application so syntax of the class containing main method looks like below at the red spring boot application will be annotated the class level and in the public static void main method we just write one like written spring boot application dot run the application dot class and argument when we run this class as a Java application then our application gets started a spring boot spring application dot run is a static method and it returns an object configure a configurable application context configurable application context like it is similar to equals to spring boot spring application dot run how spring container gets started once run method gets called spring container once started is responsible for creating all the objects this is done by direct components scan remember at the red spring boot application is a combination of components can create a direct configuration but the direct enable auto configuration then dependency have dependency injection happens and manages the life cycle of all the things will happen so these are the answer that we're given by our subscriber friend itself these are not our answer one answer what is the difference between map and flat map so map transfer the transforms the element into something else it acts as a function to apply to each element and returns a new stream of values written by the past function it takes functions object function object as a parameter example function tall function tall double function too long too long function flat map combination of map and flat operation so we apply map operation on each element and then flattens the result so if function used by map is retaining a single value then map is okay but if a function used by map operation is in the stream of list or stream of stream then we go for flat the stream of value so these are the differences between map and flat map next question what is the box stream so if you want to convert stream of objects to collection I will go with list of stream how are you now taught color collectors or to the same process doesn't work on stream of primitive however like to convert the stream of primitive we must first box elements in the wrapper classes and then collect them this is type of same is called box stream example of is given here so in stream of 1 2 3 4 5 dot box dot collect to list then output will be a list of numbers to be honest even I was not aware of this what is box stream so just came to know this list spring core and stereotype annotations so spring core annotations are it that qualify it that unaware configuration components can required being lazy value and spring stereotype or component controller service and it that deposit what is the difference between controller and rest controller so that controller creates a map of model objects and finds a view for that address controller simply returns the object and object data is directly written into HTTP response as json or xml basically the rest controller equal to the controller with a direct response body that is control over as it was added in spring for next question why spring introduced at the address controller when the job could be done by using it that controller and it that response body the functioning or output of it that controller and it that response body is a default behavior of restful web services that's why spring introduced at the rest controller which combined the behavior of both at the controller and it that response body next question tell me something about swagger tools which you have used so swagger editor can edit can edit open APS specification swagger UA collection of HTML CSS JavaScript assets that dynamically generate beautiful documentation swagger code gen all those generation of AP client libraries swagger parser swagger core swagger inspector swagger hub everything has its own answer next question is what application server have you used and what are the benefits of that so I have used weblogic application server weblogic server provides various functionalities weblogic server robot support for access protocols like HTTP soap etc it also provides data access and persistence from database server it also supports SQL transaction for data integrity it also supports security so me when we use weblogic server we do know we do not have to care about protocol security protocol or security database transaction data integrity etc all these are handled by weblogic server you can focus on business logics just is there any speed increase while indexing a table and will indexing every column defeat the purpose of indexing indexing any table either memory or file system base will speed up the queries that are that select or sort result based on that column this is because the index works like a tree structure and the search distance depends upon the depth of the tree which increases a lot of which increases a lot slower than the row count of the column indexing every column doesn't defeat the purpose of indexing index but it will slow up inserts and updates because those changes will cause an update of every index of the table also the indexes takes up space on the database server so these were the questions that were shared and thank you for watching very soon we hope we'll be updating the second part of the video as well and thanks for watching if you haven't subscribed love please do subscribe thank you