Forum: Java Jun 24th, 2009 |
| Replies: 5 Views: 336 The exception stack trace said it was throwing an EOFException. Thanks JC I'll have to try that. I know its very weird error to have when opening a file but that's what it's telling me. I'll try to... |
Forum: Java Jun 24th, 2009 |
| Replies: 5 Views: 336 It's throwing an EOFException when attempting to open the file. The initial contents of the file is only an int, specifically '0'. I'm not really sure what to make of it. I tested the code with debug... |
Forum: Java Jun 23rd, 2009 |
| Replies: 5 Views: 336 Hello,
I am writing a method which must open a file, read its contents, close the file, open it later, write to the file, and close it again. The method is failing at the first step and throwing an... |
Forum: Java May 27th, 2009 |
| Replies: 2 Views: 541 It already does but thanks! I'm assuming that integers can be mixed in the same file as other objects. Is there another way to save that I could try? |
Forum: Java May 27th, 2009 |
| Replies: 2 Views: 541 Hello,
I am having problems using an ObjectInputStream to read from a file. My program uses a File to check whether or not a specific file exists. If it exists my program will attempt to create a... |
Forum: Java May 24th, 2009 |
| Replies: 2 Views: 182 Thanks for reminding me. It's been awhile since I tried it and one can only research on dial up can only go so long until the patience runs out ha! |
Forum: Java May 23rd, 2009 |
| Replies: 2 Views: 182 Hello,
I am trying to do something very simple but my dial up connection is making it hard to research so I'd like some help! I'm trying to store instances of classes I created in a file. Something... |
Forum: Java Feb 15th, 2009 |
| Replies: 2 Views: 285 Thanks ~s.o.s~! I incorrectly stated insertion sort whenever it is actually selections sort I believe. Either way I discovered that the reason it isn't working is simply because I never change... |
Forum: Java Feb 15th, 2009 |
| Replies: 2 Views: 285 Hello,
I am working on a project that requires a set of points to be sorted by their angles in relation to the x-axis. The angles, which are in radians, store their angle as a double value. My... |
Forum: Java Jan 30th, 2009 |
| Replies: 5 Views: 894 Sorry I found out the method is working and another method is distorting the data. Thanks! |
Forum: Java Jan 30th, 2009 |
| Replies: 5 Views: 894 Right I've only included the bit of code that writes the arrays... there is other code that handles each array separately. But for some reason when I print out the results the first 3 elements of the... |
Forum: Java Jan 29th, 2009 |
| Replies: 5 Views: 894 Sorry! It's supposed to recursively fill an array with all permutations of 0-3. I have other code that handles different situations but this is supposed to produce areas such as:
0 0 0 0
0 0 0 1... |
Forum: Java Jan 29th, 2009 |
| Replies: 5 Views: 894 I'm having a pretty weird logic error. It seems that this code is always ending my arrays with 3. It should (being a recursive function) iterate through 0, 1, 2, 3. My test array is of length 4 but I... |
Forum: Java Nov 16th, 2008 |
| Replies: 2 Views: 335 |
Forum: Java Nov 15th, 2008 |
| Replies: 2 Views: 335 I'm working on a project for school where we have to read from a voters database which is set up in the following manner:
voternumber:voternama:havevoted
Ex:
1253:Bill Simmons:false... |
Forum: Java Oct 31st, 2008 |
| Replies: 2 Views: 544 I am having problems reading in from a file in my project. I have a text file from which I need to read in data for creating some objects. I do not know how much data is in the file but I know the... |
Forum: Java Oct 31st, 2008 |
| Replies: 10 Views: 2,074 Ok it definitely is not finding the first line in the file. I simply removed the test for the first line and it chocked up and died a spectacular java ioexception death. The Players.txt file is in... |
Forum: Java Oct 31st, 2008 |
| Replies: 10 Views: 2,074 No those changes didn't affect it's ability to read from the file. I'm going to try changing some other pieces of code though. |
Forum: Java Oct 30th, 2008 |
| Replies: 10 Views: 2,074 No exception is caught when this loop executes. I'm really stumped! :( |
Forum: Java Oct 30th, 2008 |
| Replies: 10 Views: 2,074 No other application has hte file open.
try
{
File playerFile = new File(fileName); //new File playerFile
Scanner dataFile = new Scanner(playerFile); //new Scanner dataFile... |
Forum: Java Oct 30th, 2008 |
| Replies: 10 Views: 2,074 I'm trying to read in from a .txt file with a Scanner (see code). For some reason this line of code will never execute even though it can open the file and there is, in fact, data in it as such:
... |
Forum: Java Sep 17th, 2008 |
| Replies: 3 Views: 492 Couldn't an undefined symbol also refer to a package that wasn't imported? |
Forum: Java Sep 11th, 2008 |
| Replies: 4 Views: 1,891 Ok thanks! I'll check the Runtime class.. a little more research brought that up too. I'm used to C++ where writing to the console isn't so bad haha |
Forum: Java Sep 10th, 2008 |
| Replies: 2 Views: 454 I think its because you never increase the step integer so karel never stops the karel.move(); and karel.putBeeper(); routine. If the move(); method doesnt increase the step counter, then karel will... |
Forum: Java Sep 10th, 2008 |
| Replies: 4 Views: 1,891 Is there any way to clear the screen in a console app? I noticed that System does not even appear to have a system call similar to the system("COMMAND"); of C++. Any ideas? |
Forum: Java Sep 9th, 2008 |
| Replies: 9 Views: 2,013 Thanks for your help! My first project is coming along very nicely now. I'm using a String to compare input with acceptable values. Thanks! |
Forum: Java Sep 9th, 2008 |
| Replies: 9 Views: 2,013 I'm a computer science major with a background in C++, not Java. My professor told the class that the Scanner class has a nextInt(), nextDouble(), nextFloat(), etc for every primative type. But... |