I need some help i am lost i am getting alot of errors. Right now if you looked at it there ar some errors with the cases I know that. I am having trouble with "x = new Names("Jim", new StringBuffer("CIS"), 15);" it gives me errors about that x in not in the student class. It also gives me errors with Sets down farther. If this is to confusing, I can post the whole program with all the cases. But the assigment is confusing too look at becase were are modifying are last program.
How do you know what your code is actually doing? Put LOTS of print statements, everywhere, that is how you know. And is one the most important steps of development. You can take them out once you get everything working. (If you have a debugger that is even better.)
Also, just looking at your code, you state x = new Names etc., but I don't see where you are declaring you array x. What sort of array is it?
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Joined: Feb 11, 2003
Ok thanks for pointing that out I can not believed I missed that I guess that I was creating an array by having x = new Names("Jim", new StringBuffer("CIS"), 15);. Ok if I put one of these below with that initialize the array. I think that how I want to say it x Names = new x; or would it be x Names = new Names; then go on to this down below CODE] x = new Names("Jim", new StringBuffer("CIS"), 15); x = new Names("Shania", new StringBuffer("ACT"), 35); x = new Names("Faith", new StringBuffer("MKT"), 13); [/CODE]
Joined: Aug 20, 2001
Originally posted by jon ladd:
x Names = new x; or would it be x Names = new Names;
Neither. You want
both will work; one syntax is kept for C programmers used to their syntax (I forget which is which; I use the former).