what is superclass, please describe the difference between ordinary class and superclass

what is superclass, please describe the difference between ordinary class and superclass?

Is there difference between Java and C# in term of superclass, I am C# programmer.

Thanks
riscyAsked:
Who is Participating?
 
GENTPCommented:
It's a class that is inherited by other classe. Same as a base class.
0
 
nehayaCommented:
No differenct between Java and C# in the concept of supercalss.. but they differ in the way you call the supercalss
java uses: super.___
c# uses : base.___

so, you look for superclass in Java documentations and for base class in C#..

See these links (for c#)
simple example: http://www.csharphelp.com/archives/archive170.html
http://msdn2.microsoft.com/en-us/library/ms173152(VS.80).aspx

0
 
Fahad MukhtarDistinguished EngineerCommented:
>>what is superclass, please describe the difference between ordinary class and superclass?
Before defining superclass let me tell you what is inheritence. Inheritance is a relationship between classes where one class is the parent class of another. Sometimes people refer to the parent class as a base class, superclass, ancestor, etc. When a subclass inherits from a base class it's a "is-a-kind-of" relationship. For example, suppose we have a superclass named Cat with a subclass named Lion. A Lion is-a-kind-of Cat.  So superclass is a class from which 1 or more than one classes are inherited. The derived classes are called subclass or childclass
To see how inheritnce is implementd in c# see:
http://www.csharphelp.com/archives/archive170.html 

>>Is there difference between Java and C# in term of superclass,
There isnt any difference in functionality. Java programmers normally uses the "superclass" term, while c# developers use "base class". But its not the rule of thumb. Read this very informative article regarding the Inheritence differences between the two languages:
http://msdn2.microsoft.com/en-us/library/ms228387(VS.80).aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.