why object class is a parent of all classes in java?

Answers were Sorted based on User's Feedback



why object class is a parent of all classes in java?..

Answer / aman kumar

so that if i will give any thing to bject class then all
classes will get it easily.

Is This Answer Correct ?    8 Yes 4 No

why object class is a parent of all classes in java?..

Answer / amit singh

(1):-->Why Object Class Is A Parent Class
Reason Is Simple
In Java Only Main Thing Is That One Class Must Be There,
From Where Any User Define Class Must To Be Extend
Automatically,

(2):-->Object Is Class That Had Have Some Property
That Any Class Must To Have These Property
Means HashCode

(3):-->Simple Every Class is A Class,
But Why Reason Is That ,
Why They Made It A Class Not An Inteface Object Interface
Answer Is Simple,
Java Follow Interface For Multiple Inheritence And For
Multilevel They Used Interface,

Any Class Creating An Object ,
An Object Must Itself An Object So Object First It Self
And Object So Means First It Must To Extend And Object Class
Where Some Property Must Be There,

So Classes First Must Ber Object Then Its Type
Means Classes Extends Automatically Extend Object
Class Means Simple
Just For Object Of A Class Otherwise No Need To Make
Object Class Means James Did This Thing To KeepThis In Mind
Means Any CLass Object Itself An Object Then Type
Of Itself
So Extend Every Class From Object Class ,

(4):-->why not For Interface Means
Class Object Must To Be Object First Means An Object Type
Refrence Not An InterfaceType
So He Did Not
Used Interface Object He Used Object Class

(5):-->
Means Simple If Sons Has His Parent Definetly He Will Have
Some Default Peoperty
Means
Diabatic
Or Another Thing Means Height
By Object Class Property Is Hidden But It Will Modify
Contantly Or Not
Means Modify
Means Overloading Of Hashcode Method
Or Default Means
Dont Override hashcode
so It Will Have Normal Property
Constantly
So That Is True I Am Not Satisfy By Above
Answer
Bookish
But Not Reaching The Thought Of "Modern Age Compiler Father
James"

Thanks
Amit Singh
amitsing2008@gmail.com
iam back again after few years
thanks

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More EJB Interview Questions

What is the procedure for the creation of stateless ejb?

0 Answers  


can anyone explain me the workflow of EJB.I have developed an app. in WSAD using an example that contains CMP and session bean.But i am not able to understand the basic flow between diffrent packages.

0 Answers  


How can a CORBA object, accessed from a EJB?

0 Answers  


What transaction attributes does Java Bean containers support?

1 Answers  


In my project iam integrating telephone line using some bridge. To connect my project to that telephone line they have give some jar file. Using dat i connected with that.. To handle that event like call attented, call disposed and idle time they have give one event listener class.. I did every thing and this class is alsoo called when a particular event is fired. The only thing is i wanna call EJB from that event listener method.. But the EJB is not getting initated and exception is thrown. This below shownn error is occured only i try to call it from this event listener class. In other places EJB calling is working fine.. javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory] at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx (InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init> (InitialContext.java:197) at com.kgisl.etrac.desk.servicelocator.ServiceLocator.getInitia lContext(ServiceLocator.java:82) at com.kgisl.etrac.commonUtils.EventListener.getAdministrationE JBRemote(EventListener.java:206) at com.kgisl.etrac.commonUtils.EventListener.CallDispositioned (EventListener.java:65) Caused by: java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at com.sun.naming.internal.VersionHelper12.loadClass (VersionHelper12.java:42) at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:654) ... 6 more javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory] at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx (InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init> (InitialContext.java:197) at com.kgisl.etrac.desk.servicelocator.ServiceLocator.getInitia lContext(ServiceLocator.java:82) at com.kgisl.etrac.commonUtils.EventListener.getAdministrationE JBRemote(EventListener.java:206) at com.kgisl.etrac.commonUtils.EventListener.CallDispositioned (EventListener.java:65) Caused by: java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at com.sun.naming.internal.VersionHelper12.loadClass (VersionHelper12.java:42) at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:654) ... 6 more It would be more help full if i get the solution 10x in advance balaji

1 Answers  






Differentiate Conversational from Non-conversational interactions?

0 Answers  


What is the full form of ejb in java?

0 Answers  


Can EJB made to handle multiple transactions?

0 Answers  


Which is more beneficial: CMP or BMP?

0 Answers  


What is session bean in ejb?

0 Answers  


What is EJB server provider?

0 Answers  


Define SessionContext ?

0 Answers  


Categories