Difference between Superclass and Subclass?

Answer Posted / sathya


A subclass inherits all the properties of a Super class.
A Subclass can access all the methods, variables of super
class and not vice versa.
A Subclass extends a Super class.

Is This Answer Correct ?    110 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is illegal identifier in java?

577


Can we sort hashset in java?

611


What is an example of procedure?

499


Explain purpose of sleep() method in java?

608


If you do not want your class to be inherited by any other class. What would you do?

552






What are three ways in which a thread can enter the waiting state in java programming?

671


What is concurrent hashmap and its features?

505


Explain method local inner classes ?

576


How do you do math powers in java?

563


How do you check if a character in a string is a digit or letter?

499


What are extraneous variables examples?

513


How do you detect memory leaks?

570


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

583


What are annotations in java?

610


How many bytes is a char in java?

518