they asked class A{}
class B{}
class c{}
all the three class saved as a single file,there is no main
method in the file
and anothe class
M.java
class m
{
psvm(String args[])
{
// here the parent class can access
}
}
Answers were Sorted based on User's Feedback
Answer / suresh
Yes. You can call parent classes ( i.e A or B or C) inside
of class M by instantiate and invoke methods. If parent
classes have static methods you can directly access without
instantiating.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is an infinite loop? How infinite loop is declared?
Can we iterate through collection using for loop?
How do you check if a character in a string is a digit or letter?
What is instance example?
What is the difference between stream and buffer?
What is string data type?
Does unicode support all languages?
What is the type of lambda expression?
What is parsing a sentence?
Is string a class?
What is difference between string and new string?
What is the ==?