Explain about Superclass and Subclass?
Answers were Sorted based on User's Feedback
Answer / jagadeesh
sub class is the child of super class and super class is
the parent of sub class
sub class auto matically having all the properties of sub
class and super class itsef, but super class having all the
properties of super class only not the sub class properties.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
super class is the one which will declare members and
methods and will allow all the subclasses to make use of them.
sub class is the class which inherits the mebes and methods
from the super class and declares it's own members as well.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / sanjay singh chauhan
like above example both are right the child class have all
the proprety of the parrent class when we requored then we
call with child class object;
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / niranjanravi
Super class is the class that is inherited and Subclass is
the class that does inheriting.
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / kumari
super class all properties bydefault available to the sub class super class properties and methods inherited in subclass
if sub class not satisfy with super class properties then modify that properties by using oop's concept.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / mike
The original object or an entity class becomes a superclass of the original object or entity when a subclass has been derived one or more occurances inheriting the attributes of the superclass.
| Is This Answer Correct ? | 1 Yes | 2 No |
What is void in java?
In collection sorting comparable and comparator interface will be used..but why this two interfaces required..two will work same purpose so why there are two interfaces instead of one?when to use comparator and when to use comparable?
What are the data types supported by java? What is autoboxing and unboxing?
Explain about public and private access specifiers?
Can we increase array size dynamically in java?
How do you load an HTML page from an Applet ?
when i write string s1="java"; in one program(application) and string s2="java"; in another application on the same jvm will both objects s2,s2 will refer to same memory location where "java" is stored in string pool.
How do you remove an object from an arraylist in java?
Write a program in java to establish a connection between client and server?
What do you mean by stream pipelining in java 8?
if num=687; U have to get num=6+8+7;
what is the replacement method of stop() of thread