
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Raja has Published 469 Articles

raja
2K+ Views
A lambda expression is a function that expects and accepts input parameters and produces output results. It is an instance of a functional interface and also known as a single abstract method interface (SAM interface) like Runnable, Comparator, Callable and etc. We can declare a variable as a final string[] array and able to access that array ... Read More

raja
252 Views
ToLongBiFunction is a in-built functional interface from java.util.function package. This functional interface accepts two reference type parameters as input and produces a long-valued result. ToLongBiFunction interface can be used as an assignment target for a lambda expression or method reference and contains only one abstract method: applyAsLong().Syntax@FunctionalInterface interface ToLongBiFunction { long applyAsLong(T t, U u); ... Read More

raja
281 Views
ToLongFunction is a functional interface defined in java.util.function package. This functional interface accepts a reference type as input and produces a long-valued result. ToLongFunction interface can be used as an assignment target for a lambda expression or method reference. It contains only one abstract method: applyAsLong().Syntax@FunctionalInterface interface ToLongFunction { long applyAsLong(T value); }Exampleimport java.util.*; import java.util.function.ToLongFunction; ... Read More

raja
276 Views
ToIntBiFunction is a built-in functional interface from java.util.function package. This interface accepts two parameters as input and produces an int-valued result. ToIntBiFunction interface can be used as an assignment target for a lambda expression or method reference. It contains only one abstract method: applyAsInt() and doesn't contain any default or static methods.Syntax@FunctionalInterface interface ToIntBiFunction { int applyAsInt(T t, U u); ... Read More

raja
300 Views
ToDoubleBiFunction is a functional interface defined in java.util.function package. This functional interface accepts two parameters as input and produces a double-valued result. ToDoubleBiFunction interface can be used as an assignment target for a lambda expression or method reference. This interface contains only one abstract method: applyAsDouble() and doesn't contain any default or static methods.Syntax@FunctionalInterface interface ToDoubleBiFunction { ... Read More

raja
1K+ Views
A Map interface implements the Collection interface that provides the functionality of the map data structure. A Map doesn't contain any duplicate keys and each key is associated with a single value. We can able to access and modify values using the keys associated with them.In the below two examples, we can able to sort a Map by both ... Read More

raja
248 Views
LongUnaryOperator is a functional interface from java.util.function package. This functional interface accepts a single long-valued operand and produces a long-valued result. LongUnaryOperator interface can be used as an assignment target for lambda expression and method reference. It contains one abstract method: applyAsLong(), one static method: identity() and two default methods: andThen() and compose().Syntax@FunctionalInterface public interface LongUnaryOperator long ... Read More

raja
793 Views
The variables defined by the enclosing scope of a lambda expression can be accessible within the lambda expression. A lambda expression can access to both instance, static variables and methods defined by the enclosing class. It has also access to "this" variable (both implicitly and explicitly) that can be an instance of enclosing class. The ... Read More

raja
778 Views
Method reference is one of a way in a lambda expression to refer a method without executing it. In the body part of a lambda expression, we can call another method if they are compatible with a functional interface. We can also capture "this" and "super" keywords in method references.In the below two examples, ... Read More

raja
319 Views
DoubleUnaryOperator is a functional interface defined in java.util.function package. This functional interface expects a parameter of type double as input but produces the output of the same type. DoubleUnaryOperator interface can be used as an assignment target for lambda expression and method reference. This interface contains one abstract method: applyAsDouble(), one static method: identity() and two default methods: ... Read More