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
}
}
Answer Posted / 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 |
Post New Answer View All Answers
Why do we need variables?
Explain the difference between call by refrence and call by value?
Does substring start with 0?
What is a char in java?
What is the difference between and ?
What are three ways in which a thread can enter the waiting state in java programming?
What is bifunction in java?
What are the difference between composition and inheritance in java?
What are accessor methods in java?
Which sorting algorithm is best in java?
What is Java Shutdown Hook?
What is package private scope in java?
What is passing parameters in java?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
Is ++ operator is thread safe in java?