I'm storing a instance of Entry class in an Object.
Entry
Object
Entry newentry = new Entry(j, 0.0); Object test = newentry;
How can I convert the test Object back into an Entry class to access the Entry class method getValue()?
test
getValue()
Typecast it:
Entry newentry = new Entry(j, 0.0); Entry test = (Entry) newentry;
Also, if getValue is a class method, you don't need an instance to access it, you can call it directly:
getValue
Object x = Entry.getValue();
1.4m articles
1.4m replys
5 comments
56.9k users