ganeshaneesh
asked on
Java Object, interface, HLD and LLD
Hi,
I want to know why Object class is superclass for every class(not performance overhead?), why interfaces, and exact details of what is HLD and LLD.
Thanks,
Aneesh.
I want to know why Object class is superclass for every class(not performance overhead?), why interfaces, and exact details of what is HLD and LLD.
Thanks,
Aneesh.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please close it off.
but have you understood the concept, is your doubt cleared?
ASKER
Actually, my ques is we are not going to use all/few methods of Object class in user class always, though it extends Object class by default. Will not this be a performance hit? What is the key point of extending Object class in user classes?
-Aneesh.
-Aneesh.
>>Will not this be a performance hit?
what makes you think that?
>>What is the key point of extending Object class in user classes?
as said, methods in Object class are required by all the classes
what makes you think that?
>>What is the key point of extending Object class in user classes?
as said, methods in Object class are required by all the classes
ASKER
>>what makes you think that?
As I extend a class(default Object class) to my class, though i dont use the methods of its super class, while creating object for my class, it will have the implementions of the Object class also rite? This is a kind of issue with resource utilzation and also access issue(performance overhead) rite?
>>as said, methods in Object class are required by all the classes
Could you tell me why is it(methods of Object class) required?
Aneesh.
As I extend a class(default Object class) to my class, though i dont use the methods of its super class, while creating object for my class, it will have the implementions of the Object class also rite? This is a kind of issue with resource utilzation and also access issue(performance overhead) rite?
>>as said, methods in Object class are required by all the classes
Could you tell me why is it(methods of Object class) required?
Aneesh.
>>while creating object for my class, it will have the implementions of the Object class also rite? This is a kind of issue with resource utilzation and also access issue(performance overhead) rite?
>>
no, there is no resource overhead on the additional methods, there will be only if the base class has some attributes/fields for which memory has to be allocated when you creat instance.
>>Could you tell me why is it(methods of Object class) required?
for example, getClass method, every instance of a class should be able to tell what type the instance is
>>
no, there is no resource overhead on the additional methods, there will be only if the base class has some attributes/fields for which memory has to be allocated when you creat instance.
>>Could you tell me why is it(methods of Object class) required?
for example, getClass method, every instance of a class should be able to tell what type the instance is
ASKER
"because Object class has the methods every class need to have!"?
and
HLD - High level design( provides high level design info )
LLD - Low level design( provides detailed design info )