How to access database object to my application.



I want to access a object which contains some value like id,name,college and address. Here it returns some address but i am not getting object value, i attach 3 java program below, please check.

1: GetterSetter method  2: Creating object for insert data  3: For Access data.

Here object created and value inserted successfully but when i am trying to access that object it only access some address of object not the data. Like This (nextpack.InsertionClass@5c7fa833). how to get those value at a time in a ArrayList and i want to return this ArrayList to another method. 

I know if i am using toString method inside my GetterSetter class i am directly get my requirement but my question is without using tostring method. like a independent object and database.

Thank you.


Unfortunately the problem is not clear. If you print objects of a class that doesn't have a toString() method, then the toString() method of java.lang.Object is invoked and produces something such as "nextpack.InsertionClass@5c7fa833". This is of course a general Java behaviour that has nothing to do with ObjectDB.


ObjectDB Support