Tech Mahindra
Shore Infotech India Interview Questions and Answers
Q1. Write a Program , How Can you sort by Employee Salary with Java 8 ?
Program to sort employee salaries using Java 8
Use Java 8 Stream API to sort the employee salaries
Use Comparator to compare salaries
Collect the sorted salaries into a list
Q2. Java8: Sort a list of employee based on their name using stream Final as a class, method and variable. Difference seek and wait Difference between protected and default
Sort a list of employees by name using Java8 streams, explain seek vs wait, and compare protected vs default access modifiers.
Use stream to sort employees by name: employees.stream().sorted(Comparator.comparing(Employee::getName)).collect(Collectors.toList())
Seek is used to search for a particular element in a collection, while wait is used to pause the execution of a thread.
Protected access modifier allows access within the same package and subclasses, while default access m...read more
Q3. What Micro services design pattern used
The microservices design pattern used is the API Gateway pattern.
API Gateway pattern is used to provide a single entry point for clients to access multiple microservices.
It helps in routing requests, load balancing, authentication, and monitoring.
Examples include Netflix Zuul and Amazon API Gateway.
Q4. How to center a div using csd
To center a div using CSS, set the margin property to auto and specify a width for the div.
Set margin property to auto
Specify a width for the div
Q5. Why we use arrow function
Arrow functions provide a concise syntax and lexical scoping compared to traditional functions.
Arrow functions have implicit return statements
They do not bind their own 'this' keyword
They have a shorter syntax compared to traditional functions
They are useful for callbacks and functional programming
Example: const double = num => num * 2;
Example: const sum = (a, b) => a + b;
Q6. Different but angular 2 and 8
Angular 2 and 8 are different versions of the Angular framework.
Angular 2 was released in 2016, while Angular 8 was released in 2019.
Angular 8 introduced several new features and improvements over Angular 2, including better performance, improved accessibility, and enhanced tooling.
Angular 8 also introduced the Ivy rendering engine, which offers improved bundle sizes and faster compilation times.
Angular 2 is no longer supported by the Angular team and has reached end-of-life ...read more
Interview Process at Shore Infotech India
Top Senior Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month