I've been on and off messing with programming for years, never could get full head into it, but trying now, maybe it is because my peers are quite the typical "lololol computer nerd!" kind of people. Maybe joining a good forum/community will help with that.
Anyway, now that I've wasted time babbling... I picked up a Sams Teach Yourself Java in 24 Hours book. I like its flow but I am having an issue with one of their little "try it outs."
First hours of the book, kiddy stuff:
class BlankFiller {
public static void main(String[] args) {
System.out.println("The " + args[0]
+ " " + args[1] + " fox "
+ "jumped over the "
+ args[2] + " dog."
);
}
}
I am using NetBeans. I did what it said and tried running it without adding the arguments to get the error. However, after setting project configuration with main class as BlankFiller and adding the three arguments, I still getException in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at BlankFiller.main(BlankFiller.java:3) Java Result: 1so basically... ????
BTW I did take an intro C++ class a couple years ago, and it was a joke, doing quite a bit more complicated stuff than this, so I kinda know what I am doing right now, as far as glaringly obvious mistakes go anyway. Thanks for your time


Sign In
Create Account

Back to top









