This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Protected members in a protected static inner class
posted 5 years ago
Ok I came across an interesting dilema and was wondering if anyone could answer it.
This is probably not good practice and you would never do it.. but for an intellectual exercize
Lets say I have the following class in a package com.thing.mine:
Now how would a class outside the com.thing.mine package access the members of the static inner class?
Here are some attempts which came up with compiler errors
also this one for kicks
Also gave, to my surprise, an access error istead of a class not found error... According to convention com.thing.mine.StaticInner.SimpleConstants should be in com/thing/mine/StaticInner/SimpleConstats.java.. but I get an access error... That would certainly have my head banging against a wall for hours. Is that even to spec?
Anyway let me know what other stuff you all may find.
Doin' Java to be one of the cool kids.
I usually use Perl;