Filter interviews by
I applied via LinkedIn and was interviewed in Mar 2021. There were 5 interview rounds.
Yes, we can pass values during object creation using constructors.
Constructors are special methods that are called when an object is created.
They can take parameters to initialize the object's state.
Values passed during object creation are used to initialize instance variables.
Example: public class Person { String name; int age; public Person(String name, int age) { this.name = name; this.age = age; } }
Example usage: P
Array is a fixed-size data structure while Array list is a dynamic data structure.
Array has a fixed size while Array list can grow dynamically.
Array can store only homogeneous data types while Array list can store heterogeneous data types.
Array is faster than Array list in terms of accessing elements.
Array list provides more functionality like add, remove, and search.
Example of Array: int[] arr = new int[5]; Example of
OOP concepts in Java with real time examples
Encapsulation - hiding implementation details of a class. Example: private variables in a class
Inheritance - creating a new class from an existing class. Example: subclass extending a superclass
Polymorphism - ability of an object to take many forms. Example: method overloading and overriding
Abstraction - showing only necessary details to the user. Example: abstract classes an
Exceptions are errors that occur during program execution. There are two types: checked and unchecked.
Exceptions are objects that represent errors or exceptional conditions that occur during program execution.
Checked exceptions are checked at compile time and must be handled or declared in the method signature.
Unchecked exceptions are not checked at compile time and can be handled or left to propagate up the call stack...
Top trending discussions
I applied via Naukri.com and was interviewed in Sep 2024. There were 3 interview rounds.
Create an API to fetch id and JSON from the client.
Create a RESTful API endpoint that accepts requests from the client
Use a GET request to fetch the id and JSON data from the client
Implement error handling for invalid requests or missing data
Use Java 8 stream to find the forth highest salary from a List.
Use stream() method to convert the List to a stream.
Use distinct() method to remove duplicates.
Use sorted() method to sort the salaries in ascending order.
Use skip() method to skip the first three highest salaries.
Use findFirst() method to get the forth highest salary.
I applied via Company Website and was interviewed in Nov 2024. There were 2 interview rounds.
I was interviewed in Oct 2024.
I applied via Company Website and was interviewed in Aug 2024. There was 1 interview round.
Use streams to find prime numbers in an array
Use Java streams to filter out non-prime numbers from the array
Check if a number is prime by dividing it by all numbers less than its square root
Create a method to check if a number is prime
posted on 1 Oct 2024
I applied via Campus Placement
DP graphs strings it was good
Reverse a linked list by changing the direction of pointers
Start with three pointers: current, previous, and next
Iterate through the list, updating pointers to reverse the direction
Return the new head of the reversed list
The Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Start with two variables initialized to 0 and 1
Loop through desired number of iterations, adding the previous two numbers to get the next number
Print or store each number in the series
posted on 8 Aug 2024
I applied via Referral and was interviewed in Jul 2024. There was 1 interview round.
Object-oriented programming concepts that focus on data encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: bundling data and methods that operate on the data into a single unit (class)
Inheritance: ability of a class to inherit properties and behavior from another class
Polymorphism: ability to present the same interface for different data types
Abstraction: hiding the complex implementation details
I want to switch to explore new technologies and challenges in a different industry.
Interested in learning new skills and technologies
Seeking new challenges and opportunities for growth
Want to explore different industry perspectives
I applied via Naukri.com and was interviewed in Apr 2024. There was 1 interview round.
Java collections are data structures that store and manipulate groups of objects.
Types of collections include List, Set, Map, Queue, etc.
Internal workings involve data structures like arrays, linked lists, hash tables, etc.
Collections framework provides interfaces and classes for working with collections.
Count occurrences of a specific string in an array of strings.
Iterate through the array and use a HashMap to store the count of each string.
Use the string as key and increment the count each time it is encountered.
Return the count of the specific string at the end.
Using stream to filter a list of strings
Use the filter method to apply a predicate to each element in the stream
Convert the stream back to a list using the collect method
Software Developer
10
salaries
| ₹1.1 L/yr - ₹4 L/yr |
Software Engineer
4
salaries
| ₹3 L/yr - ₹10 L/yr |
Senior Software Developer
4
salaries
| ₹11 L/yr - ₹14 L/yr |
Senior Software Engineer
4
salaries
| ₹7 L/yr - ₹22 L/yr |
Quality Analyst
3
salaries
| ₹3.7 L/yr - ₹3.7 L/yr |
Bajaj Finserv
Wells Fargo
JPMorgan Chase & Co.
HSBC Group