-
Java two-dimensional array example
A Java 2d array example.
Date: 2019-08-11 View: 1423
-
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: 1550
-
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: 1472
-
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: 1266
-
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: 1385
-
Gson How to parse JSON
Gson provide simple toJson() and fromJson() methods to convert Java objects to / from JSON.
Date: 2019-08-11 View: 1467
-
Jackson Convert JSON array string to List
Few Jackson examples to convert a JSON array string to a List
Date: 2019-08-11 View: 1686
-
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: 1602
-
Jackson How to parse JSON
Jackson provide writeValue() and readValue() methods to convert Java objects to / from JSON.
Date: 2019-08-11 View: 1429
-
Jackson @JsonView examples
In Jackson, we can use @JsonView to limit or control fields display for different users.
Date: 2019-08-11 View: 1604
-
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: 1258
-
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: 1306
-
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: 1663
-
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: 1287
-
Java – Convert String to double
In Java, we can use Double.parseDouble() to convert a String to double
Date: 2019-08-11 View: 1622