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 derived datatype?
Can we override constructors?
What do you understand by java virtual machine?
What is json parser in java?
Which keyword specify that a variable is effectively final ?
Can java object be locked down for exclusive use by a given thread?
What is collection class in java? List down its methods and interfaces.
Can constructor be protected in java?
What is the difference between stringbuffer and stringbuilder?
How do you use substring in java?
Can a class have multiple superclasses?
What is constructor chaining in java?
What are the three best choices for a development environment?
What is java instanceof operator?
Explain the difference between treeset and treemap in java?