This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Array help/ declaring the scanner console Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Array help/ declaring the scanner console " Watch "Array help/ declaring the scanner console " New topic
Author

Array help/ declaring the scanner console

Canh Ly
Greenhorn

Joined: Jun 22, 2012
Posts: 7
Hi guys, im needed help with a compile error I'm getting for my code. I am using a scanner to read a dat file I already made with values from -1.0 and 1.0, but the problem I am getting is where I declare (below) the file to the console. The error I am getting is saying that it can't find the symbol, for the variable sounds1. Wondering what I was doing wrong here? It is declared in my main so theoretically it should work, but I have looked in the books and it looks the same. I'll put the first skeleton code so you can better understand my thinking behind my work. Thanks guys! I know posting help for assignments is frowned upon, but I'm not asking for help writing my code or anything just help and a little guidance thanks!!





Canh Ly
Greenhorn

Joined: Jun 22, 2012
Posts: 7
Solved it!! Moved the File filein above the sounds1 and sounds 2 I put it in the wrong order so the doubles were trying to get info from nowhere. And When I was getting errors for sounds1 in the classes for printA and init A I didnt switch the sounds1.length to a.length so it was syntactically incorrect and wouldn't correct. Here is the new code that compiles.

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Array help/ declaring the scanner console
 
Similar Threads
How should I split up this big method? Still need help please!
Getting rid of redundancy?
Exceptons
Please help
How to return value back to main?