Compiles, but won't output anything but "0"

I'm using Xinox JCreator LE, trying to run the following code:
import java.io.*;
public class Tester {
     //default constructor
     public Tester() {
          //for storing my elements! yay
          Element [] myElements;
          System.out.print("test");
          //read in the file to an array
          myElements = readInElements();
          //make sure it's read in properly
          for (Element e : myElements) {
               System.out.println(e);
     //read in elements from a comma separated values file
     private Element [] readInElements() {
          Element [] myElements = null;
          System.out.println("test");
          try {
               //count the number of lines
               int numLines = 0;
               BufferedReader count = new BufferedReader(new FileReader("elements.csv"));
               while (count.readLine() != null) numLines++;
               count.close();
               //resize the array
               myElements = new Element[numLines];
               numLines = 0;
               //fill the array
               BufferedReader in = new BufferedReader(new FileReader("elements.csv"));
               //get each line, split it around commas, add a new Element to the array
               String str;
               while ((str = in.readLine()) != null) {
                    String [] line = str.split(",");
                    //if the file isn't correct, blow up
                    if (line.length != 8) throw new IOException("Malformed input file.");
                    //create the new element in the array
                    myElements[numLines++] = new Element(
                         Integer.parseInt(line[0]),
                         Double.parseDouble(line[1]),
                         line[2],
                         line[3],
                         Integer.parseInt(line[4]),
                         Integer.parseInt(line[5]),
                         Integer.parseInt(line[6]),
                         Double.parseDouble(line[7])
               in.close();
          } catch (IOException e) {
               System.out.print(e);
               System.exit(1);
          return myElements;
     //hello I am a main method how are you today
     public static void main(String [] args) {
          System.out.print("test");
          new Tester();
}It compiles fine, but when I run it I get this as output:
--------------------Configuration: Assignment 3 - JDK version 1.6.0_02 <Default> - <Default>--------------------
0
Process completed.I'm hoping I'm just missing something very simple because this is quite annoying.

It worked from the command line; there was an extra class in the folder called "Test" which the IDE defaulted to for some reason. Thanks, I knew it was something stupid :)

Similar Messages

  • My apps won't download to my iPad but will to my phone. When I put it my password, it just stops and won't do anything else????

    My apps won't download to my iPad but will to my phone. When I put it my password, it just stops and won't do anything else????

    Unless you have a copy of the iPod backup file from the previous computer installation you are out of luck. If yo have that file move it to your computer and restore the iPod from that backup.  Otherwise, you will have to restore the iPod to factoery defaults/new iPod and lose all your app date. That is the way it is since the iPod sees the computer as a new computer/iTunes library.  That backup file is located:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\

  • Brand new Ipod touch.  we attached to the computer because we don't have wifi.  Now what.  We set up in ID in itunes.  The Ipod won't do anything, just shows itunes on screen but won't budge.

    Brand new Ipod touch.  We attached to the computer because we don't have wifi.  Now what?  We set up in ID in itunes.  The Ipod won't do anything, just shows itunes on screen but won't budge.

    To get iTunes to see your iPod:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
    or
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X

  • I reset my iPod...now it won't do anything. It has a USB cord pointing at the itunes music symbol. I assume I need to download itunes, but I dont know how....

    I reset my iPod...now it won't do anything. It has a USB cord with an arrow pointing at the itunes music note. I assume I need to download it back to the iPod but I can't figure out how....

    YOU SIR ARE STUCK IN A BOOT LOOP XD ok I have to easy fixes for this!
    Fix 1- go to iTunes and restore your iPod
    Fix 2- plug it into the computer and wait for the noise then hold the power and home button down hold them down for 10 seconds on the home button and 15 seconds on the power then it should shut off and make a noise then turn back on to the lock screen.

  • I was trying to update my iPhone but now it is frozen on the black screen with the apple icon. It won't do anything

    I was trying to update my iPhone but now it is frozen on the black screen with the apple icon. It won't do anything. Any suggestions?

    Is your iphone hacked/jailbroken?

  • HT1766 I cannot backup my iphone, it keeps telling me the backup is corrupt and not compatible. All forums have suggested I delete the last backup but that was months ago and I'm afraid if I do that and it still doesn't work, I won't have anything saved

    I cannot backup my iphone, it keeps telling me the backup is corrupt and not compatible. All forums have suggested I delete the last backup but that was months ago and I'm afraid if I do that and it still doesn't work, I won't have anything saved. Can anyone help?

    Try to connect in recovery mode, explained in this article:
    iOS: Unable to update or restore
    Before that, back up your device, explained here:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    How to back up your data and set up as a new device
    You can check your warranty status here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • HT1459 I did an update on my ipod touch, now it says it is in restore mode. i don't want to lose my info, but my ipod won't do anything now.  thanks itunes; it was working fine until i did the update you said i needed.  what do i do now??????

    I did an update on my ipod touch, now it says it is in restore mode. i don't want to lose my info, but my ipod won't do anything now.  thanks itunes; it was working fine until i did the update you said i needed.  what do i do now??????

    No one here said anything about an update or your device needing it.
    FYI, you are not addressing Apple here, we are all users like yourself.
    If the device is in recovery mode, the only option is to restore it.  All data on the device is gone.  This should not be an issue if the device has been used as designed and regularly synced/backed up.

  • I am using versio 11.1. of iTunes. I created several radio stations. My "Outlaw Country" worked for a few songs. But now it won't play anything.

    I am using versio 11.1. of iTunes. I created several radio stations. My "Outlaw Country" worked for a few songs. But now it won't play anything.

    I'm having exactly the same problem, with this station only. Anyone?

  • I am a student trying to purchase creative card with a maestro card but won't allow anything other than master card or visa, is there any way around this?

    I am a student trying to purchase creative cloud with a maestro card but won't allow anything other than master card or visa, is there any way around this?

    No, not that I know about... but you might check the credit card page to see if there is an option
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html

  • I recently updated my iPod to version 5.0 but it's slower than usual and it won't sync anything. how do I solve this problem?

    when ever I try to sync music the sync button doesn't work. This just started happening since I updated to version 5.0. I tried restoring it but that didn't work. It still won't sync anything. what do I do?

    For slowness see:
                                      ios 5 make my ipod 4g slow (Updated)                    
    Haw are you trying to sync? Manual or automatically?
    Are you checking the music you want synced?
    Do you see anything in the progress bar whn you try to sync?

  • HT1414 I've done all the steps to update my ipad. but it tells me to connect to itunes which it is, but it won't do anything.

    Please help!  I've updated my ipad and it tells me to connect to itunes to complete set up. I am connected to itunes.  I don't know what to do! it won't do anything! I've restarted my device several times and it does the same thing.  It will say "connected to itunes" for about 2-3 minutes, then it just changes to "connect to itunes" but the device is still connected!

    Hi Stacy1986,
    If you are having issues updating or restoring your iPad, you may find the following article helpful:
    Apple Support: If you can't update or restore your iOS device
    http://support.apple.com/kb/ht1808
    Regards,
    - Brenden

  • My ipod touch says it is connected to wifi, but won't run anything that uses it like safari or itunes, and I don't know how to fix it

    Can anyone help me? my  ipod touch says it is connected to wifi, but it won't run anything that uses wifi like safari or itunes, and I don't know how to fix it

    You didn't indicate if it ever worked.  If it NEVER did, the problem could be caused by a firewall in the router.  For reasons that I do not understand, that will affect IOS (iPod/iPad) communication but will not affect computers or other devices.
    You will need administrative access to the router.  If a firewall is present, turn it off and test the iPod again.  If it works, turn the firewall back on but weaken it a notch and test the iPod again.  Repeat as required.

  • I can't set Firefox to open PHP files with Firefox (in preferences- applications-php files) Firefox won't accept anything but "always ask" and Preview. I want to preview php files in Bbedit and that requires that Firefox can open it.

    with an open php file in Bbedit (Macintosh) it was possible to preview appearance by chosing "Preview in.." in Bbedit's "Markup" menu. This called Firefox to open and display the file. Now, doing this continually repeats a "Open with (choose)" request.

    Unfortunately this solution doesn't work for me for local files (on my computer). Still I can only choose to open in Notepad or "other". It seems that I can select Firefox, but it won't do anything when I actually select it.... I did NOT have this problem with the previous version of Firefox (before 6.0.2). The only thing that's changed, is the Firefox update from yesterday (September 28th, 2011).

  • Mac Pro turns on and goes to desktop but won't do anything from there

    Hey guys,
    I've had my Mac Pro for about 3 years now (fully updated) and have owned macs for about 20 years now and have never run into this issue. Hopefully you can help. I can turn my mac on and reach the login screen. I login and reach the desktop. From there weird things start happening.
    1. Safari won't load. My dock where the Safari button is goes into hiding the second I click on Safari. Nothing loads.
    2. If I go to my main drive and click on the Applications folder, the window disappears and I'm back looking at my desktop.
    3. If I try to open System Preferences it may come up and it may not. Depends on the time.
    4. iTunes will still open and work (although all my iTunes files are on a separate harddrive).
    5. If I try to Restart or Shutdown the computer won't. I have to manually shut it down by holding the power button.
    6. If I mess around with trying to open things long enough (Safari, Applications Folder, etc) the entire computer will lock up. I can still move the mouse around but it won't do anything.
    I have booted the computer from the Install Disc and have run Disk Repair and have even repaired permissions and still nothing fixes this issue. Does anyone have any idea on what to do?

    Buy Disk Warrior.
    Clone your system with SuperDuper.
    Install a clean set of the system (erase and install) and full updates.
    Gradaully test it out.
    I would not use it as is.
    Normally I would say, try a new "test" user account and see if the problem goes away (after you have a backup).
    Your DVD is not 10.6.6, and Apple First Aid is not as thorough as say Disk Warrior, good start but not to do full reliable repairs.
    Every hard shutdown etc just adds and corrupts the directory and file system.
    You do have corrupt files, prefs and more.
    I'm sure there is or ought to be some nice FAQs on system maintenance and repair for Macs.
    http://www.thexlab.com/faqs/faqs.html

  • TS3274 my ipad has a black screen and the apple logo and won't do anything else. I have tried to reset it but to no avail.

    My ipad has a black screen and the apple logo and won't do anything else. I have tried to reset to no avail.

    Try and force iPad into Recovery Mode
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3.While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.
    Note: Data will be lost. You may have to repeat the above many times.

Maybe you are looking for