What are inner and anonymous class?

Answer Posted / sathya


Inner classes as name suggests, can be declared within a
class, as for that matter, with in a for statement too... or
with in a method of another class.

Anonymous classes are also inner classes but without a name,

The advantage being more abstraction of code, but more
confusing to beginners

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a native method in java programming?

523


What are thread safe functions?

508


What happens when you add a double value to a string?

538


What is the purpose of lambda expressions?

584


What is a nonetype?

560






What purpose do the keywords final, finally, and finalize fulfill?

610


What is public/private protected in java?

541


What is classes in java?

515


What is the difference between the paint() and repaint() methods?

583


What do you mean by platform independence of Java?

532


What is the difference between preemptive scheduling and time slicing?

585


What is the difference between a field variable and a local variable?

569


What is a copy constructor in java?

578


What is the difference between Java and C++?

613


Explain 5 features introduced in jdk 1.7?

611