-
Java – Check if a String contains a substring
In Java, we can use String.contains() to check if a String contains a substring.
Date: 2019-08-11 View: 1520
-
Java BlockingQueue examples
In Java, we can use BlockingQueue to create a queue which shared by both producer and the consumer.
Date: 2019-08-11 View: 1520
-
Java How to read a file into a list?
In Java, there are few ways to read a file line by line into a List
Date: 2019-08-11 View: 1520
-
Java Files.walk examples
The Files.walk API is available in Java 8, it is recommended to use try-with-resources to close the Files.walk stream.
Date: 2019-08-11 View: 1520
-
Java ProcessBuilder examples
In Java, we can use ProcessBuilder to call external commands easily :
Date: 2019-08-11 View: 1520
-
Java How to list all files in a directory?
Two Java examples to show you how to list files in a directory :
Date: 2019-08-11 View: 1520
-
Java How to run Windows bat file
In Java, we can use ProcessBuilder to run a Windows batch file like this :
Date: 2019-08-11 View: 1520
-
Java ArrayIndexOutOfBoundsException example
This java.lang.ArrayIndexOutOfBoundsException is thrown when we are accessing an array with an index which is greater than the size of an array.
Date: 2019-08-11 View: 1520
-
Java How to compare String
In Java, we use equals() to compare String.
Date: 2019-08-11 View: 1520
-
Java – Convert Integer to String
In Java, you can use String.valueOf() to convert an Integer to String.
Date: 2019-08-11 View: 1520
-
Java 8 How to sort list with stream.sorted()
Few examples to show you how to sort a List with stream.sorted()
Date: 2019-08-11 View: 1520
-
Java How to declare and initialize an Array
Few Java examples to declare, initialize and manipulate Array in Java
Date: 2019-08-11 View: 1520
-
Java 8 How to convert IntStream to Integer[]
The key is boxed() the IntStream into a Stream<Integer>, then only convert to an Array.
Date: 2019-08-11 View: 1520
-
Java 8 Convert a Stream to Array
In Java 8, we can use .toArray() to convert a Stream into an Array.
Date: 2019-08-11 View: 1520
-
JDBC PreparedStatement SQL IN condition
Java JDBC PreparedStatement example to create a SQL IN condition.
Date: 2019-08-11 View: 1520