Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long code example
Example 1: java.lang.long cannot be cast to java.lang.integer
Long.valueOf(x).intValue()
Example 2: java.lang.long cannot be cast to java.lang.integer
Integer.valueOf(x).longValue()