الأربعاء، 30 أكتوبر 2019

Java 13 API - What Are New Features? (JDK 13 Changes)

1. Introduction


In this article, We will learn what are the new features of Java 13 that are added to JDK 13.

Download JDK 13 from the Oracle official website.

Now we are going to learn about the following new changes step by step. Before that, you may have a question that "Is really JDK 13 has major changes?". Because a new java release is expected for every six months. So, Raising this question is common. Answer to this question is "no" changes are very minor. This does not impact the core developers. Except who closely works on CDS, ZGC, Socket API, and switch expressions (It is good to know).

Below is the complete list of changes in JDK 13.



JEP 350: Dynamic CDS Archives
JEP-351: ZGC: Uncommit Unused Memory
JEP-353: Reimplement the Legacy Socket API
JEP-354: Switch Expressions (Preview) (developer feature)
JEP-355: Text Blocks (Preview) (developer feature)

From this list, the first 3 changes can be used directly but the last two are in preview (developer feature). So, We can not use them directly. You will understand how to use the preview functionalities as we go through them each.

الثلاثاء، 29 أكتوبر 2019

Beginners Guide to Spring Email (Spring Boot)

1. Overview


In this article, We'll learn how to send an email using Spring or Spring Boot through step by step procedure. This is absolutely designed for beginners.

In this tutorial, We will see the following as required to send mail in the spring framework with a step by step.


  • Maven dependencies for spring and spring boot.
  • Understanding the common mailing terminologies in spring.
  • Spring and spring boot mailing properties.
  • Sending simple sample spring email examples.
  • Sending emails with an attachment.
  • Construction and sending an email template.
  • How to handle email sending errors.




الأربعاء، 23 أكتوبر 2019

Java Program to Check Leap Year

1. Introduction:


In this program, you'll learn to check if the given year is a leap year or not. This is checked using a if else statement.

A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is perfectly divisible by 400.

Java Program to Check Leap Year


الأربعاء، 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.

السبت، 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.

الثلاثاء، 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.

الخميس، 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.