Out of curiosity, I was looking through the files of a simple Android application developed for controlling a machine (I didn’t develop it, which isn’t relevant to the question, I suppose). I’m trying to get the app running on my laptop to see how it works. In the code, I found many appearances of the following:
class null implements AdapterViewICS.OnItemClickListener
{
//... some other stuff
}
I have no experience with Java code at all, but when using Android Studio to view these files the null
keyword is marked as an error: java: <identifier> expected
, which seems reasonable although I don’t understand how this happened (I didn’t change the code and the app works on my phone). My hypothesis is that most of these classes aren’t used in the actual application and that’s why these errors never caused trouble (if they are even errors at all), but they are now preventing me from running on my computer and I’d like to fix that.
Could anyone with Java experience tell me if this is correct, or explain why this could have happened (maybe some quirk in the decompiling?)
I’ve tried looking up class definition syntax for Java but I haven’t found anything about null
being used as an accesor, return type, or anything as such.
Also when changing null
to Null
the error disappears (as expected) and the class is marked with no usages
. This confuses me because I’m unsure if the class wasn’t ever used in the first place or doesn’t appear now since I changed its identifier.