aspose file tools*
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark ""Cannot Find Symbol" error " Watch ""Cannot Find Symbol" error " New topic
Author

"Cannot Find Symbol" error

Ben Drx
Greenhorn

Joined: Jul 01, 2006
Posts: 2
Hello,

I'm just starting out with Java, I took a class years ago (1.1) and then never touched it again. My only other programing experience is with VB6, but just use it for little things.

My Problem:

When compiling my files "Default.java" I get the error "Cannot Find Symbol" with a carrot pointing to the first "." in System.Out.Println.

I've tried importing Java.io.* hoping it might be included in that package. All the samples I've looked at for the last hour look just like mine or at least the same general mechanics. I starting copying a sample from my Headstart book, and then one from my reference book, finally i dumbed it down to this:

public class Default {
public static void main(String args[])

{
System.Out.PrintLn("Blah blah blah!!!");
}
}

Any help would be greatly appreciated. I'm assuming I don't have part of the JDK set up right. NetBeans gives me the same problems as well. I have 1.5.0, upgrade 7 installed for both JDK and JVM. Sorry if i'm too long winded.

Thanks,
Ben
Saket Barve
Ranch Hand

Joined: Dec 19, 2002
Posts: 229
Ben,

Java is case-sensitive!



Is this the way you have it in your code too or is this just a typo while posting the message on the forum here?

Saket
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Welcome to JavaRanch!

Just to expand on what Saket already pointed out...

The convention in Java is to capitalize the first letter of class names (like "System," which is a class in java.lang), but use lowercase for the first letter of variables (like "out," which is a variable in the System class) and methods (like "println," which is a method in the PrintStream object referenced by "out").


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Ben Drx
Greenhorn

Joined: Jul 01, 2006
Posts: 2
You guys are the greatest. I did play with caps trying to get it too work but I always went from all caps and all lower. Thank you, thank you, thank you and thanks. I spent way too much time with this last night and had null sucess.

Thanks,
Ben
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Ben Drx:
... All the samples I've looked at for the last hour look just like mine or at least the same general mechanics...

Be careful with: "the same general mechanics." This implies an assumption that the differences shouldn't matter, when it's clear that something is causing a problem.
[ July 02, 2006: Message edited by: marc weber ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Cannot Find Symbol" error