| |
GeekInterview.com > Interview Questions > J2EE > Core Java
| Print | |
Question: What's the difference between Object and "E"?
Answer: I'm trying to write an Iterator class for a LinkedList class that I wrote. One of the methods is "public E next()" I try to return an "E" but eclipse says "cannot convert from Object to E". How do I fix this? |
| August 08, 2008 06:05:11 |
#3 |
| shishir11485 |
Member Since: August 2008 Total Comments: 1 |
RE: What's the difference between Object and "E"? |
| Object having a reference of one variable store in stack whereas "E" is created in a heap don't have a reference variable |
| |
Back To Question | |