4 ms·
> Is that an ART/Dalvik feature ? Yes, ART has had this for a few years now. For example in Oreo this code: static Integer nums[] = new Integer[100];
by kllrnohj 8y ago
> Is that an ART/Dalvik feature ?
Yes, ART has had this for a few years now. For example in Oreo this code:
static Integer nums[] = new Integer[100];
public static String stabSelf() {
return nums[new Random().nextInt(100)].toString();
}
Will produce this exception:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Integer.toString()' on a null object reference