hi guys I need urgent help with my project. I need to use this code
where the data type of "s" is int array whereas I dont know what data type "h" should be. when i tried it as "int", im getting this error int cannot be dereferenced. whats the problem here? should i include any import statements for solving this? what data type must "h" be?
Please help me out. URGENT [ April 13, 2008: Message edited by: praveen livingstone ]
"h" looks to be an array of some class that has member variables named "suffix" and "prefix"; i.e.,
Since we don't know what "SomeUnknownClass" is, I can't tell you if import statements are needed. It might be a class you're supposed to write. Note that "suffix" and "prefix" aren't keywords in Java; they have no special meaning. They must just be variable names.
There obviously is a class called Element. You can try going through the API documentation, where "Element" appears five times, but I suspect, as Ernest is hinting, that it is either a class you have to write yourself, or a class your teacher is giving you.
You haven't provided enough information for us to help you properly, and I think you need to go back to whoever set the assignment and ask for more information about where to find these classes. Have you got a sheet of instructions for your project? Does it say anything about Element or what "h" is?
Joined: Oct 13, 2005
I don't think any of the 5 Elements I found matches your code, so it is obviously something you have to write yourself, OR something your instructor has provided. And "h" would appear to be an array of Elements.