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

How are destructors defined in java?

570


What is java used for?

551


How we create object in copy constructor?

639


What is defined as false sharing in the context of multithreading?

502


What are the advantages of exception handling in java?

648






What is independent and dependent variables in research?

466


What programs use java?

470


What is the inheritance?

549


What do you mean by data type?

543


Can we override the static methods?

568


What is an image buffer?

531


Why put method is used?

524


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

610


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

606


Difference between Linked list and Queue?

604