Filter interviews by
I applied via Shine and was interviewed in Jul 2022. There were 2 interview rounds.
Java is platform independent because it uses the concept of bytecode and virtual machine.
Java code is compiled into bytecode, which is a platform-independent representation of the code.
The bytecode is then executed by the Java Virtual Machine (JVM), which is platform-specific.
The JVM interprets the bytecode and translates it into machine code that can be executed on any platform.
This allows Java programs to run on diff...
Top trending discussions
I applied via Walk-in and was interviewed in Feb 2022. There were 4 interview rounds.
All maths
C.C++,java,html,css
I worked as a Software Engineer at XYZ Company.
Developed and maintained Java applications
Collaborated with cross-functional teams to gather requirements and design solutions
Implemented unit tests and performed code reviews
Troubleshooted and resolved software defects
Participated in Agile development process
I am a Junior Java Developer with a passion for coding and problem-solving.
I have a strong understanding of Java programming language and its frameworks.
I have experience in developing web applications using Java, Spring, and Hibernate.
I am familiar with database management systems like MySQL and Oracle.
I have worked on projects that involved implementing RESTful APIs and integrating third-party APIs.
I am a quick learn...
I am a Junior Java Developer with a passion for coding and problem-solving.
I have a strong understanding of Java programming language and its frameworks.
I am familiar with object-oriented programming principles and design patterns.
I have experience in developing web applications using Java, HTML, CSS, and JavaScript.
I am proficient in using IDEs like Eclipse or IntelliJ and version control systems like Git.
I have worke...
I applied via Walk-in and was interviewed in Nov 2024. There were 3 interview rounds.
It's walkin, so they conducted 1 technical mcqs round.
HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values based on keys.
HashMap uses an array of buckets to store key-value pairs.
Keys are hashed to determine the index in the array where the key-value pair will be stored.
In case of hash collisions, a linked list or a balanced tree is used to store multiple key-value pairs in the same bucket.
HashMap allows null keys...
Function to find and return all non-repeating characters in an array of strings.
Iterate through the array and count the occurrences of each character using a HashMap.
Then iterate through the array again and check if the count of each character is 1, if so add it to the result list.
Return the list of non-repeating characters.
To find the 3rd highest salary in a database, we can use a SQL query with the 'LIMIT' and 'OFFSET' keywords.
Use a SQL query with 'ORDER BY salary DESC' to sort the salaries in descending order.
Use 'LIMIT 1 OFFSET 2' to skip the first two highest salaries and retrieve the third highest salary.
Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET 2;
A qualifier in Java is used to specify additional information about a primary, which is the main data type or variable.
A primary in Java is the main data type or variable, while a qualifier provides additional information about the primary.
Qualifiers can be used to modify the behavior or characteristics of a primary.
For example, in Java, 'final' is a qualifier that can be used to make a variable constant.
The main difference is that @RestController is a specialized version of @Controller that is used for RESTful web services.
Both @Controller and @RestController are used in Spring MVC to handle HTTP requests, but @RestController is specifically used for RESTful web services.
@Controller is used to create web pages, while @RestController is used to return data in JSON or XML format.
@RestController is a convenience annotati...
OOP concepts include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: class Dog extends Animal.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: private variables with public getter and setter methods.
Polymorphism: Ability for objects to be treated as instances of their paren...
Microservices communicate with each other through various communication protocols like HTTP, messaging queues, and gRPC.
Microservices can communicate over HTTP using RESTful APIs.
Messaging queues like RabbitMQ or Kafka can be used for asynchronous communication between microservices.
gRPC is a high-performance, open-source RPC framework that can be used for communication between microservices.
Service discovery mechanism...
Microservice endpoints can be accessed using HTTP requests with the appropriate URL
Use HTTP methods like GET, POST, PUT, DELETE to interact with the microservice
Construct the URL with the base URL of the microservice and the specific endpoint path
Include any necessary headers or parameters in the request for authentication or data filtering
Microservices allow for modular, scalable, and flexible software development by breaking down applications into smaller, independent services.
Microservices enable easier maintenance and updates as each service can be developed, deployed, and scaled independently.
They improve fault isolation, as failures in one service do not necessarily affect the entire application.
Microservices promote agility and faster time-to-mark...
Developed a web application for tracking employee attendance and performance
Implemented user authentication and authorization using Spring Security
Utilized Hibernate for database interaction and data persistence
Designed and developed RESTful APIs for frontend integration
Used AngularJS for frontend development to create interactive user interfaces
posted on 10 Dec 2024
Design patterns in Java are reusable solutions to common problems in software design.
Creational patterns (e.g. Singleton, Factory, Builder)
Structural patterns (e.g. Adapter, Decorator, Facade)
Behavioral patterns (e.g. Observer, Strategy, Template Method)
The diamond problem occurs in multiple inheritance when a class inherits from two classes that have a common ancestor, leading to ambiguity in method invocation.
Diamond problem arises in multiple inheritance when a class inherits from two classes that have a common ancestor.
It leads to ambiguity in method invocation as the compiler cannot determine which inherited method to invoke.
Example: Class A has a method 'display...
ExecutorService is an interface in Java that provides a way to manage and control the execution of threads in a multithreaded environment.
It is part of the java.util.concurrent package.
It provides methods to submit tasks for execution, manage thread pools, and control the execution of tasks.
It allows for the execution of tasks asynchronously and provides features like scheduling, cancellation, and monitoring of tasks.
E...
JPA is a Java specification for mapping Java objects to relational databases.
JPA stands for Java Persistence API
It provides a way to map Java objects to database tables and vice versa
JPA simplifies the development of data access layer in Java applications
It supports object-relational mapping (ORM) and allows developers to work with entities, relationships, and queries in a more object-oriented way
PreparedStatement is used in Java to execute parameterized SQL queries to prevent SQL injection attacks.
PreparedStatement is a subinterface of Statement in Java.
It is used to execute parameterized SQL queries.
It helps prevent SQL injection attacks by automatically escaping special characters.
Example: PreparedStatement pstmt = connection.prepareStatement("SELECT * FROM users WHERE username = ?");
Program to find missing numbers from Array
Iterate through the array and store each number in a HashSet
Then iterate from 1 to the length of the array and check if each number exists in the HashSet
If a number is not found in the HashSet, it is a missing number
Comparable is an interface used for natural ordering, while Comparator is used for custom ordering in Java.
Comparable interface is used to define the natural ordering of objects. It is implemented by the class whose objects are to be sorted.
Comparator interface is used to define custom ordering of objects. It is implemented by a separate class that compares objects based on specific criteria.
Example: Sorting a list of ...
List allows duplicate elements and maintains insertion order, while Set does not allow duplicates and does not maintain order.
List can contain duplicate elements, Set cannot
List maintains insertion order, Set does not guarantee order
List is implemented by classes like ArrayList, LinkedList, Set is implemented by classes like HashSet, TreeSet
Example: List
Questions on permuation and combination
I applied via Naukri.com and was interviewed in Dec 2023. There were 2 interview rounds.
1. Find longest repeating character from back.
2. Find all non-duplicates in an array and return in sorted manner.
The class will have to provide its own implementation of the conflicting default method.
When implementing multiple interfaces with the same default method, a class must provide its own implementation of the conflicting method.
The class cannot inherit the default implementation from both interfaces.
The class can choose to implement one of the default methods and provide its own implementation for the other.
Alternatively...
Terminal operations in streams produce a result or a side effect, while intermediate operations transform or filter the data.
Terminal operations are the final operations in a stream pipeline, such as forEach, collect, or reduce.
Intermediate operations are operations that can be chained together, such as filter, map, or sorted.
Terminal operations trigger the processing of the stream and produce a result or a side effect...
try vs try-with-resources
The 'try' statement is used to define a block of code to be tested for exceptions.
The 'try-with-resources' statement is used to automatically close resources that implement the AutoCloseable interface.
Try-with-resources is more concise and less error-prone compared to try-catch-finally.
Try-with-resources can handle multiple resources in a single statement.
Iterator is a universal interface for iterating over a collection, while ListIterator is a specialized interface for iterating over lists.
Iterator can only move forward, while ListIterator can move in both directions.
ListIterator has additional methods like previous(), hasPrevious(), and add().
ListIterator is only available for List implementations, while Iterator can be used with any collection.
Projections in Spring Data JPA allow customizing the shape of the data returned from a query.
Projections are used to retrieve specific fields or a subset of fields from an entity.
They help in reducing the amount of data transferred over the network.
Projections can be defined using interfaces or classes.
They can be used with both JPQL and native SQL queries.
Projections can be used to fetch related entities as well.
The two types of compiler in Angular are JIT (Just-in-Time) compiler and AOT (Ahead-of-Time) compiler.
JIT compiler compiles the code at runtime in the browser.
AOT compiler compiles the code before the application is deployed to the browser.
JIT compilation is slower but allows for faster development and debugging.
AOT compilation is faster but requires additional build step before deployment.
Data binding in Angular allows automatic synchronization of data between the model and the view.
Interpolation: {{ }} - binds data from the component to the view
Property binding: [] - binds data from the component to an element property
Event binding: () - binds an event from the view to a method in the component
Two-way binding: [()] - combines property and event binding to achieve two-way data flow
Promises are used for asynchronous programming in JavaScript, while Observables are used for reactive programming.
Promises represent a single value that may be available now or in the future.
Observables represent a stream of values that can be emitted over time.
Promises are eager, meaning they start executing as soon as they are created.
Observables are lazy, meaning they only start executing when subscribed to.
Promises...
Constructor is a special method used to initialize an object, while ngOnInit is a lifecycle hook in Angular.
Constructor is used to create and initialize an object of a class.
ngOnInit is a lifecycle hook in Angular that is called after the component is initialized.
Constructor is defined using the constructor keyword, while ngOnInit is a method defined in the component class.
Constructor is called only once during the cre...
Inline templates are used for small, simple templates, while external templates are used for larger, complex templates.
Inline templates are defined within the component's TypeScript file using the template property.
External templates are defined in separate HTML files and linked to the component using the templateUrl property.
Inline templates are useful for small components or when the template is simple and doesn't re...
HttpClient module is used for http calls in Angular.
HttpClient module is part of the @angular/common/http package.
It provides a simplified API for making HTTP requests.
It supports various HTTP methods like GET, POST, PUT, DELETE, etc.
It also supports features like request/response headers, query parameters, error handling, etc.
Example: import { HttpClient } from '@angular/common/http';
Good coding questions related array and string
Senior Consultant
34
salaries
| ₹8.2 L/yr - ₹30 L/yr |
Business Manager
20
salaries
| ₹27 L/yr - ₹40 L/yr |
Senior System Analyst
17
salaries
| ₹15 L/yr - ₹30 L/yr |
Associate Systems Engineer
15
salaries
| ₹4.2 L/yr - ₹6 L/yr |
Management Consultant
14
salaries
| ₹22 L/yr - ₹45 L/yr |
Accenture
Deloitte
KPMG India
PwC