Filter interviews by
Constructor overloading in Java is when a class has multiple constructors with different parameters.
Allows a class to have multiple constructors with different parameter lists
Constructors must have different number or type of parameters
Example: class Car { Car() {} Car(String model) {} }
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructor, fields, and methods, while interface cannot have any implementation.
A class can extend only one abstract class, but can implement multiple interfaces.
Abstract class is used to define common characteristics of subclasses, while interface is used to define a contract for clas...
Top trending discussions
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
Runtime polymorphism allows a subclass to provide a specific implementation of a method that is already provided by its parent class.
Runtime polymorphism is achieved through method overriding, where a subclass provides its own implementation of a method that is already defined in its superclass.
The method to be overridden must have the same name, return type, and parameters in both the superclass and subclass.
When an o...
Streams in Java provide a way to process collections of objects in a functional style.
Streams are sequences of elements that support various operations like filter, map, reduce, etc.
They can be created from collections, arrays, or generate elements dynamically.
Streams can be sequential or parallel, allowing for efficient processing of large datasets.
Example: List<String> names = Arrays.asList("Alice", "Bob", "Cha...
Threads in Java are created by extending the Thread class or implementing the Runnable interface, and invoked using the start() method.
Threads can be created by extending the Thread class and overriding the run() method.
Threads can also be created by implementing the Runnable interface and passing an instance of the class to a Thread object.
Threads are invoked by calling the start() method on the Thread object.
Rest Template is a class in Spring that simplifies making HTTP requests and handling responses.
Rest Template is part of the Spring framework in Java.
It can be used to make HTTP requests to RESTful web services.
It simplifies the process of making HTTP calls and handling responses.
Rest Template can handle GET, POST, PUT, DELETE, etc. requests.
Example: RestTemplate restTemplate = new RestTemplate();
I applied via Naukri.com and was interviewed in Sep 2024. There were 3 interview rounds.
I applied via Campus Placement
There was pattern question in any programming language and you have make the pattern dynamic.
I applied via Referral and was interviewed in Oct 2023. There was 1 interview round.
Merge 2 sorted arrays into a single sorted array.
Create a new array with the combined length of the two input arrays
Use two pointers to iterate through the two arrays and compare elements to merge them into the new array
Handle cases where one array is longer than the other
Encapsulation, Inheritance, Polymorphism, Abstraction are the 4 pillars of OOPs
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Class in Java
Inheritance: Ability of a class to inherit properties and behavior from another class. Example: Parent and Child classes
Polymorphism: Ability to present the same interface for different data types. Example: Method overloading and overr...
I applied via Approached by Company and was interviewed in Mar 2024. There were 2 interview rounds.
Code review to find bugs
Interface features include abstraction, multiple inheritance, and contract enforcement.
Abstraction: Interfaces allow for the definition of methods without implementation, providing a blueprint for classes to follow.
Multiple Inheritance: Java interfaces support multiple inheritance, allowing a class to implement multiple interfaces.
Contract Enforcement: Interfaces define a contract that implementing classes must adhere
I applied via Naukri.com and was interviewed in Oct 2023. There were 2 interview rounds.
I applied via Job Portal and was interviewed in Jun 2023. There were 3 interview rounds.
I applied via Naukri.com and was interviewed in Apr 2023. There were 3 interview rounds.
Java is a high-level programming language used for developing applications. OOPs concepts are the principles of object-oriented programming. String is a sequence of characters.
Java is an object-oriented language that is platform-independent.
OOPs concepts include inheritance, encapsulation, polymorphism, and abstraction.
String is a class in Java that represents a sequence of characters.
Types of strings include immutable
Software Engineer
178
salaries
| ₹2 L/yr - ₹7.9 L/yr |
Senior Software Engineer
155
salaries
| ₹4.6 L/yr - ₹15.4 L/yr |
Softwaretest Engineer
69
salaries
| ₹2.2 L/yr - ₹9.2 L/yr |
Technical Lead
56
salaries
| ₹9.2 L/yr - ₹19 L/yr |
Software Developer
38
salaries
| ₹2.4 L/yr - ₹11.5 L/yr |
LTIMindtree
Persistent Systems
TCS
Wipro