This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes ArrayListMagnet- problem compiling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayListMagnet- problem compiling" Watch "ArrayListMagnet- problem compiling" New topic
Author

ArrayListMagnet- problem compiling

Eddie Davis
Greenhorn

Joined: Jul 31, 2009
Posts: 16
I'm getting this error when I try to compile the code.
ArrayListMagnet.java:3: ';' expected
Public Static Void Main (String [] args) {
^
1 error
william-daviss-macbook:chapter6 topoftiger$


I know it must be something really simple but I just can't find it. Could someone point out to me what's keeping this from compiling?

Thanks!

The actual code is below:
Max Rahder
Ranch Hand

Joined: Nov 06, 2000
Posts: 177
Java is case-sensitive, so you need to use the exact spelling, including case, of symbols and reserved words. In your case, "Public Static Void Main" should be "public static void main".
Eddie Davis
Greenhorn

Joined: Jul 31, 2009
Posts: 16
Ahh, thank you! Staring me right in the face.

Again thanks so much! Now to move to Chapter 7.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ArrayListMagnet- problem compiling
 
Similar Threads
Having some trouble with this code.
Can the index number be specified in the ArrayList add method
error with latest jdk
The Programme is not Compiling
ArrayList Question