-
Java two-dimensional array example
A Java 2d array example.
Date: 2019-08-11 View: 1296
-
How to get user input in Java
In Java, we can use java.util.Scanner to get user input from console.
Date: 2019-08-11 View: 1427
-
java.lang.UnsupportedClassVersionError
Start a Java class and hits this java.lang.UnsupportedClassVersionError, what is class file version 52 56?
Date: 2019-08-11 View: 1309
-
How to check which JDK version compiled the class?
In Java, we can use javap -verbose className to print out the class information.
Date: 2019-08-11 View: 1128
-
Java Convert ArrayList<String> to String[]
In the old days, we can use list.toArray(new String[0]) to convert a ArrayList<String> into a String[]
Date: 2019-08-11 View: 1244
-
Gson How to parse JSON
Gson provide simple toJson() and fromJson() methods to convert Java objects to / from JSON.
Date: 2019-08-11 View: 1321
-
Jackson Convert JSON array string to List
Few Jackson examples to convert a JSON array string to a List
Date: 2019-08-11 View: 1487
-
Jackson How to ignore null fields
In Jackson, we can use @JsonInclude(JsonInclude.Include.NON_NULL) to ignore the null fields.
Date: 2019-08-11 View: 1447
-
Jackson How to parse JSON
Jackson provide writeValue() and readValue() methods to convert Java objects to / from JSON.
Date: 2019-08-11 View: 1291
-
Jackson @JsonView examples
In Jackson, we can use @JsonView to limit or control fields display for different users.
Date: 2019-08-11 View: 1473
-
Java Check if a String is empty or null
In Java, we can use (str != null && !str.isEmpty()) to make sure the String is not empty or null.
Date: 2019-08-11 View: 1144
-
Java How to check if a String is numeric
Few Java examples to show you how to check if a String is numeric.
Date: 2019-08-11 View: 1183
-
JSON.simple – How to parse JSON
In this tutorial, we will show you how to parse JSON with JSON.simple
Date: 2019-08-11 View: 1527
-
Java Convert Array to ArrayList
In Java, we can use new ArrayList<>(Arrays.asList(array)) to convert an Array into an ArrayList
Date: 2019-08-11 View: 1191
-
Java – Convert String to double
In Java, we can use Double.parseDouble() to convert a String to double
Date: 2019-08-11 View: 1458