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 the function of compareto in java?
Which package is always imported by default?
What variables are stored in stack?
what do you understand by synchronization? : Java thread
What are the types of methodology?
What do you understand by looping in java? Explain the different types of loops.
What are the principle concepts of oops?
What is the type of lambda expression?
What is == in java?
How static variable work in java?
What language is java written?
What is the range of the short datatype?