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 a boolean field?
What is the use of arraylist class in java?
What is tree node in java?
Is 0 true or is 1 true?
Can you make a constructor final?
How does arraylist size increase in java?
Can we create an object of private class?
What flag up means?
Difference between predicate, supplier and consumer ?
How strings are created in java?
Is string is a data type?
What are the java ide's? Explain
Why java is said to be pass-by-value ?
Is java free for businesses?
How do you reverse sort a list in java?