Java Programs

Tutorials and articles about Java Programs


Java
Java Program: Convert String to Double
Write a Java program to convert a String to Double.
Java
How to find duplicate elements in Java Stream?
Let us take a look at how to find duplicate elements in a Java Stream.
Java
Java 8 Stream API peek() method with Example
What is the use of the peek() method in Java 8 Stream API with an example?
Java
Java Program: Find max value in List using Java 8 Stream API
Write a program in Java to find max value in List using Java 8 Stream API
Java
How to convert a String to Java 8 Stream of Char?
Let us take a look at how to convert a String object into a Java 8 Stream of Char with an example.
Java
Java Program: Find Name of the Employee with Maximum Salary using Stream API
Write a Java Program: Find the Name of the Employee with the Maximum Salary using Stream API.
Java
How to filter null values using Java 8 Stream API
Let us take a look at how to filter out null values using Java 8 Stream API.
Java
How to Convert String to Date in Java
We take a look at how to convert String to Date in Java with examples.
Java
Java: Check if a String contains another Sub-String with Examples
We take a look at ways to check if a String contains another Sub-String with Examples.
Java
[Java Program] Get Dates between Dates using Java 8 Predicate Functional Interface
Java Program to get Dates between Dates using Java 8 Predicate Functional Interface
Java
Java: Pass Predicate as Parameter to a Method Example
Let us take a look at how to Pass a Predicate as a Parameter to a Method Example in Java.
Java
Java 8 Predicate default and() function Example
We take a look at the default and() functions from Java 8 Predicate Functional Interface.
Java
Java: How to Filter a List using Predicate
Let us take a look at how to filter a List using Java 8 Predicate Functional Interface.
Java
Java Program: Random Number Generator
Write a program in Java to generate random numbers.
Java
Write to File in Java using BufferedWriter
Let us take a look at how to write to File in Java using BufferedWriter Class.
Java
Java 8: Convert Stream to Array
In this program, we take a look at how to convert Stream to Array using Java 8 code.
Java
Java: Convert String to InputStream
Let us take a look at how to make use of ByteArrayInputStream to Convert String to InputStream.
Java
Java: How to convert a file to String
In these examples, we take a look at how to convert a file to String in various Java versions.
Java
Java Multi-line String Example
In this program, we take a look at how to add Java Multi-line String.
Java
Java 8 Supplier Functional Interface Examples
Let us take a look at some programs to demonstrate Java 8 Supplier Functional Interface.
Java
Java 8: Convert Date between Time Zones Example
In this example, we take a look at how to convert date between Time Zone using Java 8 code.
Java
Java 8: Move a file from Source to Target Directory Example
In this example, we take a look at how to move a file from source to target location using Java 8 code.
Java
Check if a Java Date String is Valid or Not (Java 8)
In this program, we will see how to check if a Java date is valid or not.
Java
Java 8: Find the Max value in a List
In this Java program, we take a look at finding the max value in a list.
Java
Java: max() and min() methods java.lang.Math
In this tutorial, we will take a look at the max() and abs() methods from the Java Math class.
Java
Time Testing with Java JUnit assertTimeout method
In this article, we take a look at Time Testing with Java JUnit assertTimeout method.
Java
Java: Testing Private Methods in JUnit using reflection API Example
In this example, we take a look at how to test a private java method using reflection API and Junit.
Java
JUnit: Failing Test on NullPointerException Example
In this example, we take a look at a JUnit example of failing a test on NullPointerException.
Java
Write to a File using Java Stream API
How to write a file in Java using the Stream API for example.
Java
Java Stream with Multiple Filters Example
Let us take a look at some Java programs with Stream API with Multiple Filters - filter chaining.
Java
Is Stream within a Stream Possible in Java?
Let us take a look if a Stream within a Stream is possible in Java.
Java
Java Stream Word Count Example
In this program, we will take a look at how to do a word count of a String using Java Stream API.
Java
How to find the Length of ArrayList in Java
In this Java program, we will take a look
Java
Java: How to Add two Maps with example
In this program, we will see how to add or combine two Maps in Java.
Java
Sort Array in Ascending or Descending Order in Java
How to sort an Array in Ascending or Descending Order in Java with examples.
Java
How to Transpose a Square Matrix - Java Program
In this program, we will take a look at how to transpose a square matrix in Java with help of program.
Java
Implementing Insertion Sort Algorithm in Java Program
In this example, we will see how to implement Insertion Sort Algorithm in a Java Program
Java
Implementing Selection Sort Algorithm as Java Program
In this example, we will see how to implement Selection Sort Algorithm as a Java Program.
Java
Implementing Bubble Sort Algorithm using Java Program
In this example, we see how to implement Bubble Sort using Java Program.
Java
How to read int value using Scanner Class Java
In this program, we will take a look at how to read an int value from the Java Scanner class.
Java
How to find Integer MAX and MIN Value in Java
Find the integers max and min values in Java with examples and caution about integer overflow and underflow issues.
Java
5+ Fibonacci number Series Java Program Examples [ 0 1 1 2 3 ..]
Java Program to display Fibonacci Series 0 1 1 2 3 ...