Computer Science Canada FILE SAVING assistance |
Author: | venom [ Fri Oct 13, 2006 8:41 am ] | ||
Post subject: | FILE SAVING assistance | ||
curretly in java we have been dooing file saving currently im having a bit of a problem with retrive old data and some other parts >.>
i would ask my teacher for help but he is less than useless when it comes to actually teaching java and turing and im reading through the tuts on this forum so i may figure it out on my own |
Author: | wtd [ Fri Oct 13, 2006 11:46 am ] |
Post subject: | |
Looking at this I really think you need to go back to basics with Java. No, I do not mean "BASIC." You have numerous extraneous comments, you use the HSA garbage so that you won't be able to receive help from a huge chunk of the Java community, you have extremely poorly named methods and variables ("c" and "data", for instance. You write array declarations as "String foo[]", which while it may work, is a syntactic relcic that is not used any longer by any sane Java programmer. You have things like: "!(num == 1)" when you should know about "num != 1". You use & when you clearly mean to be using &&. Back to syntax... your use of spaces between methods and their argument lists will leave a large segment of the community with no desire to read your code. On a deper semantic level, your class is not modeling an object. This is the very reason objects exist. By not doing so, you can see how (for instance in the method "data", it makes things very awkward. Now, I am not saying this is your fault. However, it is your responsibility, if you wish to become a good Java programmer, to overcome these problems. |
Author: | venom [ Fri Oct 13, 2006 12:44 pm ] |
Post subject: | |
well this is what happens when you have to deal with a failure of a teacher teaching something you really want to learn but a rock could be more help then the teacher im still reading through that java tut so i hope to be getting better a java X3 |
Author: | CroAnte [ Wed Oct 18, 2006 9:13 am ] |
Post subject: | |
So what is it you're trying to do? I could cut and paste the code into my Java (we use Holt at my school too), but I'm too lazy. |
Author: | venom [ Thu Oct 19, 2006 7:56 am ] |
Post subject: | |
more or less i was trying to get the file saving program to work in a method but that not important atm more or less i wanted to check for old data before inputing new data. doesnt matter now i figured it out :p |