Can you have an inner class inside a method and what
variables can you access?

Answer Posted / kabita

yes we have.it is called local inner class.it can access
only final variables of outer class.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which class is the superclass for all the classes?

770


What is bytecode verifier?

699


Explain different states of a thread in java?

805


What is lambda programming?

709


What is variable and rules of variable?

755


In a class implementing an interface, can we change the value of any variable defined in the interface?

726


What is the difference between assignment and initialization?

796


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

890


What is a linkedhashmap java?

768


What is the use of parseint in java?

764


What is the difference between sop and work instruction?

692


What is the common usage of serialization?

814


Can we declare the main method of our class as private?

764


How to display arraylist values in java?

722


Explain inner classes ?

883