Tim Kinnaird

Greenhorn
+ Follow
since Jul 15, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tim Kinnaird

Thank you Fred, Rob and Joydeep.

I've been trying to name these tutorial files something that will tell me what's in them for future use. It never occurred to me that I'd be creating a confilct.

Fred, Sorry for not including my error message. I'll be sure to do that in the future.

Renamed my class and got it to work. Something interesting is that I had to change my import from 'java.util.*' to 'java.util.ArrayList' to get it to compile. I thought that 'java.util.*' meant to load in all utilities?

Either way, you guys have sorted me out.

Thanks again.

13 years ago

Noob here. Really, really raw noob.

The above is code from the book Programming Video Games/Evil Genius published in 2008.

The problems are with the .add (line 25) and .get (line 36) for the array called 'games'. I've poked around and it appears that this may have been changed since version 5 which is probably after publication of this book. As you can see, I added "<String>" (line 13 now commented out) when I created the array per examples at Sun website but this had no effect.

Program is supposed to allow user to input elements (strings) to the array and then call them out by their element position. Will not compile or run.

Can anyone point me in the right direction?

13 years ago
yep, i've got that one and a dummies book on the way.
13 years ago
Thank you Luigi and Campbell Ritchie. It did have something to do with my setup in netbeans. I was able to input from keyboard. Maybe it's because i'm older but Java feels like its hurting way more than when I dabbled in C++. I've got some books coming from the library that I hope will help. I guess I'm alot older too. Maybe my gray matter is bogging down a bit.
13 years ago
I'm not even a Noob. I'm Pre-Noob. I have some limited previous knowledge of C++ that I've practically forgotten. A hack of the worst kind, I can't get far reading instructional books before I rip my hair out. The best way for me is to get the basic syntax down and just dive in doing some coding. When I hit a snag, I go to the net and fish for awhile, hit a book or two, find my answer and then push on again until my next snag.

Incredibly foolish Noob question #1

netbeans can't seem to find any of the packages (I think they are called) that I need for simple keyboard input. I get a squiggly red line under the "i" in the first line of a code that I copy/pasted from the net: "import java.io.*;" Same squiggly under the "i" for: "import java.util.Scanner;". Both won't compile or run.

A couple days ago I DL'd the latest JDK/Netbeans bundle from sun/oracle. I'm thinking that there is maybe a supplemental library of these so-called "packages" that I need? But I've poked around the sun/oracle DL site and it ain't jumpin' out at me.

I'm tryin' to find the easiest way to simply read in information from keyboard input.

Does anyone dare face the limitless ignorance of a noob?
13 years ago