Hello! So I decided to take a break from the previous task and move on to the next one.In this task I'm susposed to, without coding to predict the outcome of some programs that are given to us.I did a few but this one got me thinkin'.This is the code
class C { static int[] values; static int len() { return values.length; } public static void main(String[] args) { len(); } }
Now I need to tell what error will hapen when I run the code and why. I'm guessing a NullPointerException, because the value of values is 0,and we are trying to return an object that is pointing to 0. Am I think right, is my logic okay? If not what am I missing.Thanks!