I am using javadoc to document my public enum. I am compiling all of my following examples using the following command: If my enum is like this, it generates a .class file without any warnings. But if my enum is like this: …..I get the following error….. Thinking I needed to put the comment somewhere else, I decided to put
Tag: anonymous-class
How can I access OuterClass field from InnerClass?
I’ve been learning Java and OOP for a few weeks now. Yesterday I learned inner class and outer class. I want to know the way to access field of outerClass from InnerClass when they have exactly same name. Like below, It is possible to access field of outerClass from innerClass when they have different names. When they have same name,
Java8 Lambdas vs Anonymous classes
Since Java8 has been recently released and its brand new lambda expressions looks to be really cool, I was wondering if this means the demise of the Anonymous classes that we were so used to. I’ve been researching a bit about this and found some cool examples about how Lambda expressions will systematically replace those classes, such the Collection’s sort