Can you have an inner class inside a method and what
variables can you access?
Answers were Sorted based on User's Feedback
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 |
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 |
for(i=0;i<100;i++) { int i=method();//method returns no's from 1 to 10; /* insert some stmts which can give output like no.of times numbers(1-10) returned. (for example if it returns 2 then i want output how many times 2 returned) like that i want output for no's 1 - 10 how many times each no returned. */ }
What is communist flag?
What is serialVersionUID and what is its need?
what is the form of storage space in java?
what is aberivation of java?
What is purpose of applet programming?
What is the role of garbage collector in java?
where to use join method and explain with real time senario?and programatical explenation also..
What do you mean by inner class in java? Explain
What is non static block in java
10 Answers Emphasis, Ness Technologies,
What are the changes in java.io in java 8 ?
What is replacefirst in java?