How to use optional in java 8 streams
In this article we will learn how to use optional in java 8 streams. Optional is a container object which may or may not contain null value. Some of the most important methods in Optional’s are . So now lets…
In this article we will learn how to use optional in java 8 streams. Optional is a container object which may or may not contain null value. Some of the most important methods in Optional’s are . So now lets…
Here i will provide list of Java Date formats that are used in Java frequently. There are different ways you can achieve the same result in Java. 1- Using Predefined Format You can directly use DateFormat class to format date…
Here you will learn to generate random number in java between two given number by different means. I will try to provide cons for different mechanism so that you can choose what is best for you.
There are n number of ways to achieve this.
In java you might face a situation where you need to split String, based on some criteria. To fulfill this requirement Java has already provided two in-built methods to achieve this.
In this topic we will learn how to calculate difference between two dates in java in terms of Second/ Minutes / Hours / Days. By Using java class. In next section we will use Java api(JODA) to perform the same…
Here we will learn to create web application in Eclipse using Servlets and JSP.
import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Scanner; /* * Here we will learn to Create Table in DB using JDBC Statements in Oracle and MySQL DB */ public class CreateTableWithStatement { public static void main(String[] args) {…
Here we will learn to connect to MYSQL DB via Java.
Here we will learn to connect to MYSQL DB via Java. import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Scanner; /* * Here we will learn to connect to Oracle DB using JDBC Driver. */ public class ConnectMySQLDB { public static…