Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to create our own/custom functional interface in Java?
The functional interface is a simple interface with only one abstract method. A lambda expression can be used through a functional interface in Java 8. We can declare our own/custom functional interface by defining the Single Abstract Method (SAM) in an interface.Syntaxinterface CustomInterface { // abtstact method }Example@FunctionalInterface interface CustomFunctionalInterface { void display(); } public class FunctionInterfaceLambdaTest { public static void main(String args[]) { // Using Anonymous inner class CustomFunctionalInterface test1 = new CustomFunctionalInterface() { ...
Read MoreHow to implement ObjLongConsumer interface using lambda expression in Java?
ObjLongConsumer is a functional interface from java.util.function package. This interface accepts an object-valued and long-valued argument as input but doesn't produce any output. ObjLongConsumer can be used as an assignment target for lambda expression and method reference and contains only one abstract method: accept().Syntax@FunctionalInterface public interface ObjLongConsumer { void accept(T t, long value) }Exampleimport java.util.function.ObjLongConsumer; public class ObjLongConsumerTest { public static void main(String[] args) { ObjLongConsumer olc = (employee, number) -> { // lambda expression if(employee != null) { System.out.println("Employee Name: " + employee.getEmpName()); ...
Read MoreHow to implement LongFunction using lambda and method reference in Java?
LongFunction is an in-built functional interface defined in java.util.function package. This functional interface expects a long-valued parameter as input and produces a result. LongFunction interface can be used as an assignment target for a lambda expression or method reference. It contains only one abstract method: apply().Syntax@FunctionalInterface public interface LongFunction { R apply(long value) }Exampleimport java.util.function.LongFunction; public class LongFunctionTest { public static void main(String[] args) { LongFunction function1 = (long i) -> { // lambda expression return i + i; ...
Read MoreSnagit Tool: Taking Better Screenshots the Easy Way
A very common need for anyone who works on computers and laptops is taking screenshots of the browser or application window that they are working with. Although the task seems easy, it can be tedious at times. Generally, if you want to take a screenshot you will use the shortcut keys on your Windows system, paste it to Paint and then modify them accordingly. However, this comes with a few drawbacks:You have to use shortcut keys and paste to Paint.You can’t take screenshots of a part of screen (without cropping it in Paint later).If you are taking screenshot of a ...
Read MoreRequirements Gathering By Business Analysts
A great user experience is all about enabling the end users to achieve their objective be it a website, a software system or a product. In order to fulfill their needs, we need to understand their work and the context of their work. The first and basic phase of software development life cycle is requirements gathering. They give clear, concise and agreed set of customer requirements that the software should provide. Business analyst and subject experts are responsible for requirement gathering process.Business customers have a tendency to expect software teams to be mind-readers, and to deliver a solution based on ...
Read MorePhobias: Embarrassing yet Compulsive Problems
Fear is a common human reaction to threat that most of us have one way or the other. But what if your fear rages through you like wild fire and beyond your levels of control? Irrepressible fears can lead to mental as well as physical distress to levels which ultimately turn into anxiety disorder technically known as phobia . It can affect people of any age. In this article I discuss categories in which phobias are divided, symptoms to identify phobia, possible causes and treatment. I briefly list out some common and some exceptionally rare phobias that you did not know ...
Read MoreMyths Around Agile - Scrum Framework
In our childhood, we used to listen to many stories from our Parents, Grandparents and also Teachers in the school. There are stories about Kings and Queens, Prince and Princes, Dogs and Monkeys etc., a wide range of stories from fictions, drama, and actions to stories with morals. One of such famous stories called as “The Sour Grapes”, where the fox jumped again and again to eat the grapes from the tree, but when he couldn’t reach to that height after many attempts, he declared that the grapes are sour.You can see the same state of affairs also occurs in ...
Read MoreHow to implement LongBinaryOperator using lambda and method reference in Java?
LongBinaryOperator is a part of the functional interface from java.util.function package. This functional interface expects two parameters of type long as the input and produces a long type result. LongBinaryOperator interface can be used as an assignment target for a lambda expression or method reference. It contains only one abstract method, applyAsLong().Syntax@FunctionalInterface public interface LongBinaryOperator { long applyAsLong(long left, long right) }Example of Lambda Expressionimport java.util.function.LongBinaryOperator; public class LongBinaryOperatorTest1 { public static void main(String[] args) { LongBinaryOperator multiply = (a, b) -> { // lambda expression return a*b; }; long a = ...
Read MoreThe 5 Best Price Tracking Tools
The E-commerce sector in our nation is booming like never before. Presently, it is occupying the third position with regards to internet users, having 10 million people who shop online. Definitely, there exists a huge potential, which is untapped to make use of.In India, Flipkart concluded its biggest online sale recently, despite few technical hiccups, they were successful in selling about 2 million items in a day for about 1.5 million people. The sales figure is quite impressive. Its fierce competitor Amazon India has also launched a mega sale later at the great Indian festival and Snapdeal is also not ...
Read MoreHow to implement IntConsumer using lambda and method reference in Java?
IntConsumer interface is a functional interface from java.util.function package in Java 8. This interface accepts a single int-valued argument as input but doesn't produce any output. Since it is a functional interface, it can be used as an assignment target for a lambda expression or method reference. It contains one abstract method: accept() and one default method: andThen().Syntax@FunctionalInterface public interface IntConsumer { void accept(int value); }Example of Lambda Expressionimport java.util.function.IntConsumer; public class IntConsumerTest1 { public static void main(String[] args) { IntConsumer displayNextInt = i -> System.out.println("Next Int ...
Read More