Blog: mkyong (Yong Mook Kim)


286 blogs updated: 39 min. ago
Gson - How to parse JSON
Gson provide simple toJson() and fromJson() methods to convert Java objects to / from JSON. toJson() Java object to JSON Gson gson = new Gso...
0
26-04-2019 02:54:00 mkyong (Yong Mook Kim) Beginners
Jackson - Convert JSON array string to List
Few Jackson examples to convert a JSON array string to a List // JSON array string // [{"name":"mkyong", "age":37}, {"name":"fong", "age":38...
3
25-04-2019 19:49:21 mkyong (Yong Mook Kim) Beginners
Jackson - How to ignore null fields
In Jackson, we can use @JsonInclude(JsonInclude. Include.NON_NULL) to ignore the null fields. P.S Tested with Jackson 2.9.8 1. Jackson defau...
3
25-04-2019 12:41:12 mkyong (Yong Mook Kim) Beginners
java.lang.UnsupportedClassVersionError
Start a Java class and hits this java.lang.UnsupportedClas sVersionError, what is class file version 52 56? Error: A JNI error has occurred,...
6
24-04-2019 02:26:45 mkyong (Yong Mook Kim) Beginners
How to check which JDK version compiled the class?
In Java, we can use javap -verbose className to print out the class information. Terminal D:\projects>javap -verbose Test Classfile /D:/proj...
6
23-04-2019 19:56:54 mkyong (Yong Mook Kim) Beginners
Java - Convert ArrayList to String[]
In the old days, we can use list.toArray(new String[0]) to convert a ArrayList into a String[] StringArrayExample.java package com.mkyong; i...
16
23-04-2019 12:49:53 mkyong (Yong Mook Kim) Beginners
How to get user input in Java
In Java, we can use java.util.Scanner to get user input from console. 1. Scanner 1.1 Read a line. UserInputExample1.java package com.mkyong;...
19
21-04-2019 12:50:25 mkyong (Yong Mook Kim) Beginners
Is Java pass-by-value or pass-by-reference?
In Java, for primitive types, parameters are pass-by-value; For object types, object reference is pass-by-value, however, Java is allowed to...
4
20-04-2019 03:14:39 mkyong (Yong Mook Kim) Beginners
Java List java.lang.UnsupportedOperationException
A simple List.add() and hits the following java.lang.UnsupportedOper ationException ListExample.java package com.mkyong; import java.util.Ar...
3
19-04-2019 20:16:47 mkyong (Yong Mook Kim) Beginners
Java two-dimensional array example
A Java 2d array example. ArrayExample.java package com.mkyong; public class ArrayExample { public static void main(String[] args) { int[][] ...
4
19-04-2019 13:15:42 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.