Answer Posted / shahid
there is one "locha" in paragraph one of answer number 1.
since local classes are also inner classes which are defined within any block and that block can be a method's body.
class OuterSpace {
private String MessageComming = "is any body there";
void receiveMessage() { //outer c;lass method
class InnerSpace { //defining class in outter class method
public void receivingMessage() {
System.out.println("message send by eline is" +MessageComming);
}
}
}
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is return data type?
Is arraylist ordered in java?
Can we convert stringbuffer to string?
What is the static keyword?
What is array and arraylist in java?
Why java uses the concept of the string literal?
What is pojo class in java?
What is the difference between actual and formal parameters?
What is parse method?
What are instance variables?
Explain the difference between abstract classes and interfaces in java?
Difference between static binding and dynamic binding?
What is the purpose of encapsulation?
Which method cannot be overridden in java?
What do you understand by Header linked List?