java tutorial: java enum in switch case
Java enum in switch case : 1. Returns the enum constant of the specified enum type with the specified name. 2. The case label...
java tutorial: java get timestamp milliseconds
Java get timestamp milliseconds : 1.System.currentTimeMillis(); 2.Calendar.getInstance().getTimeInMillis(); 3.new Date().getTime();...
Use FileWriter class to write files in Java
The FileWriter class extends from the OutputStreamWriter class. This class writes data to the stream character by character. You can create the required objects through...
java tutorial: Java enum check if value exists
Java enum check if value exists: 1. Enum class provides inspection methods 2. Check with for loop 3.Use stream iterators 4.Use a tool class similar...
java tutorial: Java Generic
Java generics, in a nutshell, generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods....
java tutorial: 5 ways to create stream in java 8
A java stream is a sequence of objects, which can be arranged, filtered, and transformed through a pipeline to produce the desired result....
java tutorial: Java exception
A java exception is an event that occurs during the execution of a java program that disrupts the normal flow of instructions....
java tutorial: java 8 Lambda built-in functional interfaces
Java 8 functional interface: Function<T, R> : R apply(T t), Supplier<T> : T get() , Predicate<T> : boolean test(T t) , Consumer<T> : void accept(T...
IntelliJ IDEA utility plugin
IntelliJ IDEA is an excellent Java IDE, with the help of excellent IDEA plugins, we can greatly improve efficiency in daily development....
How to install IntelliJ IDEA plugin in Mac
IDEA install plugin: In the preferences window, select the plugin menu on the left, search for the plugin under the marketplace on the right,...
java tutorial: three ways to generate random numbers in Java
Java random number have three ways: java.lang.Math.Random, java.util.Random, java.util.concurrent.ThreadLocalRandom...
java tutorial: java 8 lambda expression example
Lambda expressions are a simplification of anonymous inner classes, a functional programming idea that makes code look cleaner....
java tutorial: install Java JDK and Maven on Mac
Install Java JDK and Maven on mac os: 1) Download and install files from the official website; 2) Install using homebrew package manager....