Blog: mkyong (Yong Mook Kim)


408 blogs updated: 20 min. ago
Java - How to get keys and values from Map
In Java, we can get the keys and values via map.entrySet() Map map = new HashMap<>(); // Get keys and values for (Map.Entry entry : map.entr...
15
12-08-2019 07:40:11 mkyong (Yong Mook Kim) Beginners
Spring JdbcTemplate Handle Large ResultSet
Spring JdbcTemplate example to get a large ResultSet and process it. P.S Tested with Java 8 and Spring JDBC 5.1.4.RELEASE 1. Get large Resul...
4
07-08-2019 11:16:40 mkyong (Yong Mook Kim) Beginners
Java - Convert Integer to Long
In Java, we can use Long.valueOf() to convert an Integer to a Long TestInteger.java package com.mkyong.example; public class TestInteger { p...
0
01-08-2019 16:42:04 mkyong (Yong Mook Kim) Beginners
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: public List findAll...
4
01-08-2019 10:24:03 mkyong (Yong Mook Kim) Beginners
Java - How to lock a file before writing
In Java, we can combine RandomAccessFile and FileChannel to lock a file before writing. LockFileAndWrite.java package com.mkyong; import jav...
8
27-07-2019 06:35:40 mkyong (Yong Mook Kim) Beginners
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. pom.xml commons-io commons-io 2.6 1....
6
26-07-2019 11:18:45 mkyong (Yong Mook Kim) Beginners
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 d...
0
24-07-2019 18:52:52 mkyong (Yong Mook Kim) Beginners
Spring Boot JDBC Examples
In this tutorial, we will show you how to use Spring Boot JDBC JdbcTemplate and NamedParameterJdbcTemplat e. Technologies used : Spring Boot...
16
22-07-2019 18:35:08 mkyong (Yong Mook Kim) Beginners
Java 8 Stream - Convert List> to List
As title, we can use flatMap to convert it. Java9Example1.java package com.mkyong.test; import java.util.Arrays; import java.util.List; impo...
19
18-07-2019 23:54:19 mkyong (Yong Mook Kim) Beginners
Java Regular Expression Examples
Java 8 stream and regular expression examples. Note Learn the basic regular expression at Wikipedia 1. String.matches(regex) 1.1 This exampl...
18
18-07-2019 15:54:41 mkyong (Yong Mook Kim) Beginners


© Jiri Pinkas | this project on GitHub | related: JavaVids | Maven Central Repository Search | Java školení | Top SQL Blogs | monitored using: sitemonitoring

Top Java Blogs is a Java blog aggregator (with English-written blogs only) focused on Java SE, Java EE, Spring Framework and Hibernate.