• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Cannot Find Symbol" error

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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").
 
Ben Drx
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic