i
Saksoft
Filter interviews by
Optional class in Java 8 is used to represent a value that may or may not be present.
Optional class helps to avoid NullPointerException by explicitly handling null values.
It provides methods like isPresent(), ifPresent(), orElse() to work with optional values.
Example: Optional
Stream API in Java provides a way to process collections of objects in a functional style.
Stream API allows for easy manipulation of collections using functional programming concepts like map, filter, and reduce.
Streams can be created from various data sources like collections, arrays, or even I/O channels.
Stream operations can be either intermediate (like filter or map) or terminal (like forEach or collect).
Top trending discussions
I applied via Approached by Company and was interviewed in Aug 2024. There were 2 interview rounds.
posted on 28 Apr 2024
I applied via Naukri.com and was interviewed in Mar 2024. There were 3 interview rounds.
posted on 30 Nov 2023
I applied via Naukri.com and was interviewed in Oct 2023. There were 2 interview rounds.
OOPs concepts are fundamental principles of object-oriented programming that help in designing and implementing software solutions.
Encapsulation: Bundling data and methods together in a class.
Inheritance: Creating new classes by inheriting properties and behaviors from existing classes.
Polymorphism: Ability of an object to take on many forms.
Abstraction: Hiding complex implementation details and providing a simplified ...
This program counts the occurrence of each letter in a given string.
Use a HashMap to store the count of each letter.
Iterate through the characters of the string and update the count in the HashMap.
Finally, print the count of each letter.
SQL query to find third highest salary from employee table.
Use the ORDER BY clause to sort the salaries in descending order
Use the LIMIT clause to limit the result to the third row
Use a subquery to exclude the highest and second highest salaries
Array is a fixed-size data structure while ArrayList is a dynamic-size data structure in Java.
Array has a fixed length, while ArrayList can grow dynamically.
Array can store both primitive types and objects, while ArrayList can only store objects.
Array uses square brackets [] for declaration, while ArrayList uses angle brackets <>.
Array provides direct access to elements using index, while ArrayList provides methods for...
ArrayList is a dynamic array that can grow or shrink in size. It stores objects and provides methods for adding, removing, and accessing elements.
ArrayList is part of the Java Collections Framework.
It is implemented as a resizable array.
Elements can be added using the add() method.
Elements can be accessed using the get() method.
Elements can be removed using the remove() method.
The size() method returns the number of el...
The default size of an ArrayList is 10.
The default initial capacity of an ArrayList is 10.
If the number of elements exceeds the initial capacity, the ArrayList automatically increases its size.
The capacity of an ArrayList can be increased manually using the ensureCapacity() method.
posted on 1 Feb 2024
I applied via Naukri.com and was interviewed in Mar 2023. There were 3 interview rounds.
Basic core Java mcqs and aptitude questions
I applied via Referral and was interviewed in Mar 2024. There were 3 interview rounds.
posted on 29 Apr 2023
I applied via Naukri.com and was interviewed in Mar 2023. There were 2 interview rounds.
This program sorts the characters of a string in descending order.
Convert the string to a character array
Sort the character array in descending order
Convert the sorted character array back to a string
Java Developer interview questions on beans, functional interfaces, SQL queries, hibernate, and more.
Scope of beans refers to the visibility of a bean within an application context.
Functional interfaces have only one abstract method and can be used as lambda expressions.
Classes cannot be private, but their constructors can be.
SQL query to find employees of a particular department table: SELECT * FROM employees WHERE de...
based on 6 reviews
Rating in categories
Senior Consultant
340
salaries
| ₹5.4 L/yr - ₹22 L/yr |
Consultant
293
salaries
| ₹3 L/yr - ₹12.3 L/yr |
Lead Consultant
164
salaries
| ₹7.5 L/yr - ₹28 L/yr |
Associate Consultant
96
salaries
| ₹2 L/yr - ₹5.5 L/yr |
Software Engineer
52
salaries
| ₹3.5 L/yr - ₹13.1 L/yr |
TCS
Infosys
Wipro
HCLTech