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

Answers were Sorted based on User's Feedback



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

Answer / janet

yes, we can have an inner class inside a method and final
variables can be accessed.

Is This Answer Correct ?    15 Yes 0 No

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

Answer / 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

More Core Java Interview Questions

What are autoboxing and unboxing? When does it occur?

1 Answers  


What is integer size in java?

1 Answers  


Can we overload run() method in java?

1 Answers  


Where is java located?

1 Answers  


Can we catch more than one exception in single catch block?

1 Answers  


what is the difference between Object Based Language and Object Oriented Language?

1 Answers   Aspire,


What are drawbacks of singleton class?

1 Answers  


What are the four corner stones of oop?

1 Answers  


Is zero a natural number?

1 Answers  


Can finally block be used without a catch?

1 Answers  


What is array list in java?

1 Answers  


Why multiple inheritance is not supported by java?

1 Answers  


Categories