Top "Anonymous-class" questions

An anonymous class is a local class without a name.

When do I need anonymous class in C++?

There's a feature called anonymous class in C++. It's similar with anonymous struct in C. I think this feature is …

c++ anonymous-class
Is it possible to make an anonymous class inherit another class?

This is a long shot, but I have a funny coding situation where I want the ability to create anonymous …

c# anonymous-class
Anonymous delegate implementation in Objective-C?

Is it possible to declare anonymous implementations of things like Delegates in Objective-C. I think I have the terminology right, …

objective-c delegates anonymous-class
Java anonymous class efficiency implications

Is there any difference in efficiency (e.g. execution time, code size, etc.) between these two ways of doing things? …

java performance anonymous-class execution-time
Java: Anonymous inner class using a local variable

How can I get the value of userId passed to this method in my anonymous inner subclass here? public void …

java scope anonymous-class
Calling newly defined method from anonymous class

I instantiated an object of an anonymous class to which I added a new method. Date date = new Date() { public …

java anonymous-class anonymous-methods
Anonymous class replaced with lambda expressions

I have sample code which uses Java 8 new stream functionality (get a range of int values 1 .. 20, skip the first 9, then …

java lambda anonymous-class java-8
Do anonymous classes *always* maintain a reference to their enclosing instance?

I'm working with some code where one object, "foo", is creating another object, "bar", and passing it a Callable. After …

java garbage-collection anonymous-class
Java: Access local variables from anon inner class? (PriorityQueue)

I want to use a PriorityQueue to do a topological sort on a graph. For brevity, I'd like to use …

java graph priority-queue anonymous-class topological-sort