-
Java 8 Convert LocalDateTime to Timestamp
In Java, we can use Timestamp.valueOf(LocalDateTime) to convert a LocalDateTime into a Timestamp.
Date: 2019-08-11 View: 1508
-
Java 8 Stream The peek() is not working with count()?
Many examples are using the .count() as the terminal operation for .peek(), for example:
Date: 2019-08-11 View: 1638
-
Java 8 Convert ZonedDateTime to Timestamp
Java example to convert java.time.ZonedDateTime to java.sql.Timestamp and vice verse.
Date: 2019-08-11 View: 2136
-
java.sql.SQLException: operation not allowed: Ordinal binding and Named binding cannot be combined!
Ordinal binding or index binding:
Date: 2019-08-11 View: 2689
-
Java Prime Numbers examples
The following Java examples will print a list of all the prime numbers up to 1,000:
Date: 2019-08-11 View: 1518
-
Java 8 Parallel Streams Examples
Few Java 8 examples to execute streams in parallel.
Date: 2019-08-11 View: 1273
-
Java Convert Integer to Long
In Java, we can use Long.valueOf() to convert an Integer to a Long
Date: 2019-08-11 View: 1305
-
java.sql.SQLException: The server time zone value xx time is unrecognized
Making a JDBC connection to the MySQL server with the latest mysql-connector-java:8.0.16 and hits the following SQLException:
Date: 2019-08-11 View: 1533
-
How to loop an enum in Java
Call the .values() method of the enum class to return an array, and loop it with the for loop:
Date: 2019-08-11 View: 1402
-
Java 8 Stream Convert List<List<String>> to List<String>
As title, we can use flatMap to convert it.
Date: 2019-08-11 View: 3077
-
Java Regular Expression Examples
Java 8 stream and regular expression examples.
Date: 2019-08-11 View: 1208
-
Spring Boot JDBC Examples
In this tutorial, we will show you how to use Spring Boot JDBC JdbcTemplate and NamedParameterJdbcTemplate.
Date: 2019-08-11 View: 1301
-
Spring Boot JDBC Stored Procedure Examples
In this tutorial, we will show you how to use Spring Boot JDBC SimpleJdbcCall to call a stored procedure and stored function from a Oracle database.
Date: 2019-08-11 View: 1989
-
Java How to read last few lines of a File
In Java, we can use the Apache Commons IO ReversedLinesFileReader to read the last few lines of a File.
Date: 2019-08-11 View: 1438
-
Java How to lock a file before writing
In Java, we can combine RandomAccessFile and FileChannel to lock a file before writing.
Date: 2019-08-11 View: 1304