Wednesday, September 11, 2019

Complete Guide to Java 8 Lambda Expressions

1. Overview

In this tutorial, We will learn Java 8 new features about Lambda Expressions step by step in-depth.

Lambda word came from lambda calculus which is used to describe computations. We will go through one by one as below topics today.

Definition
Comparing to Older Java Versions
Lambda Syntax
Lambda Valid Examples
Lambda Rules
Where to Use Lambda
Lambda Sorting Example
Invalid Lambda Expressions
Complete Guide to Java 8 Lambda Expressions
We have already shown few examples on Java 8 Examples Programs Before and After Lambda & Streams. Go through this article before continuing further on this tutorial. If you have basic understanding of lambda's then you are good to continue.

Saturday, August 10, 2019

HTML Forms - <form> Tag Examples

1. Overview


In this tutorial, We'll learn about how to use <form> tag and what is the importance of it. We will talk about a few examples where <form> tag usage is appropriate.

The HTML <form> element defines a form that is used to collect user input. Below is the format of the form tag.

<form>
...
...
form inside elements
...
...
</form>

HTML-Forms


<form> tag is used in all registration or log in pages. Because the user provides the data and pushed to the server for persistence.

Tuesday, July 30, 2019

HTML - Adding Google Maps to Web Page - API Example

1.Overview


In this tutorial, We'll learn how to add Goole Maps to your website or page.

This is very easy to understand adding Google maps to the web page.

To make maps available on a web page, we must include the google maps API using the below script.

<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&callback=myMap"></script>

You have to register and get the key from https://cloud.google.com/maps-platform/. Without the key, maps can not be loaded.

Thursday, July 11, 2019

Java 8 - Working with IntSupplier

1. Overview


In this tutorial, We'll learn how to use IntSupplier Functional Interface and part of package java.util.function which has been introduced in java 8.

IntSupplier represents a supplier of int-valued results. This is the int-producing primitive specialization of Supplier.

As we discussed in the previous article on "Working with Supplier Functional Interface", IntSupplier comes under Supplier's category and does not take any argument.

IntSupplier has only one functional method that is getAsInt().

Java 8 - Working with IntSupplier


When we expect an int primitive value rather than Integer wrapper then we should not use directly Supplier FI. Because it does autoboxing and leads to performance issues.