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 is formatted output in java?

0 Answers  


What about method local inner classes or local inner classes in java?

0 Answers  


How does access modifiers work?

1 Answers   Wipro,


Which containers use a FlowLayout as their default layout?

3 Answers  


What method is used to know the status of Checkbox(i.e it is checked or unchecked)?

1 Answers  






where the static methods will live ,on stack ? can you explain brefly

1 Answers  


Difference between the paint() and repaint() methods?

1 Answers  


What does bitwise or mean?

0 Answers  


What does singleton class mean?

0 Answers  


What is the function of character?

0 Answers  


What is the purpose of void class?

0 Answers  


There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.

3 Answers  


Categories