-
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: 2071
-
java.sql.SQLException: operation not allowed: Ordinal binding and Named binding cannot be combined!
Ordinal binding or index binding:
Date: 2019-08-11 View: 2588
-
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: 1471
-
Java 8 Parallel Streams Examples
Few Java 8 examples to execute streams in parallel.
Date: 2019-08-11 View: 1226
-
Java Convert Integer to Long
In Java, we can use Long.valueOf() to convert an Integer to a Long
Date: 2019-08-11 View: 1262
-
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: 1473
-
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: 1355
-
Java 8 Stream Convert List<List<String>> to List<String>
As title, we can use flatMap to convert it.
Date: 2019-08-11 View: 3028
-
Java Regular Expression Examples
Java 8 stream and regular expression examples.
Date: 2019-08-11 View: 1157
-
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: 1263
-
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: 1933
-
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: 1385
-
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: 1276
-
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long
Below example, the jdbcTemplate.queryForList returns an object of Integer and we try to convert it into a Long directly:
Date: 2019-08-11 View: 1908
-
Spring JdbcTemplate Handle Large ResultSet
Spring JdbcTemplate example to get a large ResultSet and process it.
Date: 2019-08-11 View: 3012