Filter interviews by
I applied via Naukri.com and was interviewed in Apr 2023. There were 2 interview rounds.
A singleton class is a class that can only have one instance created throughout the application.
Ensure the class has a private constructor to prevent external instantiation.
Provide a static method to access the single instance of the class.
Use a static variable to hold the single instance of the class.
Example: public class Singleton { private static Singleton instance = new Singleton(); private Singleton() {} public st...
A singleton class is a class that can only have one instance created at a time.
Ensure the class has a private constructor to prevent external instantiation.
Provide a static method to access the single instance of the class.
Use a static variable to hold the single instance of the class.
Top trending discussions
I applied via campus placement at G L Bajaj Institute of Technology & Management, Greater Noida and was interviewed in Oct 2024. There were 3 interview rounds.
They asked some general Quantitative and logical questions and code snippets.
posted on 29 Nov 2024
I applied via Naukri.com and was interviewed in Oct 2024. There were 2 interview rounds.
We can easily pass the test cases
Interface in Java is a reference type, similar to a class, that can contain only constants, method signatures, default methods, static methods, and nested types.
Interfaces are used to define a contract for classes that implement them.
Classes can implement multiple interfaces in Java.
Interfaces cannot have instance fields, constructors, or non-static methods.
Example: interface Shape { void draw(); }
Example: class Circle...
Abstraction is a concept in object-oriented programming where only relevant data is shown to the user while hiding unnecessary details.
Abstraction helps in simplifying complex systems by only showing essential features.
It allows for creating abstract classes and interfaces in Java.
Example: In a car, the driver only needs to know how to drive it without understanding the internal workings of the engine.
Exceptions are unexpected events that disrupt the normal flow of a program. Exception handling is the process of dealing with these events.
Exceptions are objects that represent an abnormal condition or error in a program.
Exception handling allows developers to gracefully handle errors and prevent the program from crashing.
Java provides try-catch blocks for handling exceptions. The try block contains the code that may t...
Arrays are a collection of elements of the same data type, while Strings are a sequence of characters.
Arrays can store multiple values of the same data type, accessed by index.
Strings are immutable sequences of characters, can be manipulated using various methods.
Example: int[] numbers = {1, 2, 3}; String name = "John";
Code Snept question with 3-4 Reasoning question. Google form
Pen paper coding round. String , Array . Linkedlist , graph, questions
To find the nearest prime number, iterate from the given number in both directions until a prime number is found.
Start iterating from the given number in both directions to find the nearest prime number.
Check if a number is prime by dividing it by all numbers less than its square root.
Keep track of the closest prime number found during the iteration.
Find the second maximum number in an array of strings.
Convert the array of strings to an array of integers.
Sort the array in descending order.
Return the second element in the sorted array.
I applied via Naukri.com and was interviewed in Dec 2024. There were 4 interview rounds.
First round is technical apptitude in java or python
Second round is strings and array coding test
Third level also advanced coding level
posted on 17 Oct 2024
I applied via Walk-in
To implement a queue using a stack, use two stacks and simulate the queue operations.
Use two stacks, one for enqueue operation and one for dequeue operation.
For enqueue operation, simply push elements onto the stack used for enqueueing.
For dequeue operation, if the dequeue stack is empty, pop all elements from enqueue stack and push onto dequeue stack.
Then pop from the dequeue stack to simulate dequeue operation.
A linked list is a data structure consisting of nodes where each node points to the next node in the sequence.
Create a Node class with data and next pointer
Initialize a head pointer to null
Add nodes by updating next pointers
Traverse the list by following next pointers
posted on 18 Sep 2024
I applied via campus placement at Maharaja Agrasen Institute of Technology, Delhi and was interviewed in Aug 2024. There were 2 interview rounds.
Duration 60 min, topics: DBMS, computer networking, outputs, SQL queries
Topics: Trees, DP, Greedy
posted on 16 Sep 2024
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization helps in minimizing data redundancy by dividing the database into multiple tables.
It ensures data integrity by avoiding update anomalies.
Normalization is achieved through a series of rules called normal forms, such as 1NF, 2NF, 3NF, etc.
Example: In a database, instead of storing customer details i...
Reflection is the ability of a program to examine and modify its own structure and behavior at runtime.
Allows accessing metadata of types and members at runtime
Enables dynamic instantiation of objects
Facilitates invoking methods dynamically
Associate
40
salaries
| ₹7.7 L/yr - ₹16.9 L/yr |
Senior Associate
36
salaries
| ₹8.4 L/yr - ₹35.5 L/yr |
Salesforce Developer
33
salaries
| ₹3 L/yr - ₹10.7 L/yr |
Senior IT Analyst
14
salaries
| ₹5 L/yr - ₹11.2 L/yr |
Senior Software Engineer
13
salaries
| ₹10 L/yr - ₹30 L/yr |
Infosys
TCS
Wipro
HCLTech