java.lang.* Trial and Error

For the last few hours I’ve been trying to find out which classes behave like java.lang.Object, i.e. which cannot be amended by a field. When I do not attempt to add fields to all of java.lang.*, it seems to work, but there are 230 classes in that package, and of course I want to treat as many of these classes just like the rest. I hope I don’t have to exclude too many classes.


It seems like excluding java.lang.Object and — interestingly enough — java.lang.String is enough. I’m not worried about Object, as I mentioned before nothing is ever just an Object. But how am I supposed to handle strings?


About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in Concurrent Unit Testing. Bookmark the permalink.

Leave a Reply