Can someone show me a example of code which contains a working array? Or point out where I have gone astray???
invArray is a String array. It holds String objects -- not DVD objects. To hold DVD objects, you need to uses a DVD array.
Else open the class using some java decompiler and you can see what is the hierarchy of this object and if String is compatile cast
Originally posted by Keith Lynn:
Do you have a java .class file named DVD.java?
Keith, No I know I am lost but when Java compiles it gives you the .class extension. Now if you are asking about the class, well yes I have a class but I think it is main. Are you saying the class has to be DVD if I am referencing DVD?
Originally posted by An Sush:
You need DVD object to be present in classpath. Check out if you have the class present. If not check out the JARs present in the classpath and check if you able to trace DVD.class. If not, you need to find the class.
Else open the class using some java decompiler and you can see what is the hierarchy of this object and if String is compatible cast
I read your reply 3 times. The first time I felt it would be easier to learn German! I know it is just my ignorance... Since all of my code is in the same directory why would I need a classpath? Now your comment about JARs, I will have to look up what JAR's means. I have not come across this in my class so I am lost here.
What I would learn more from is seeing the examples of what everyone is stating. This way I could tie your words to the example, anyone? Without that I am just
- The exactly error code that you are receiving while compiling -- along with the command that you used.
- The source code for the DVD class (if it is not too big).