File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes The . that I type and copied . are different? 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 "The . that I type and copied . are different?" Watch "The . that I type and copied . are different?" New topic
Author

The . that I type and copied . are different?

Tony Jin
Greenhorn

Joined: Aug 24, 2008
Posts: 1
Hello everyone, this is my first post!
Well I just started java and came across a weird problem.

For the command that I copied from the tutorial website (only the system.out.printin)
System.out.println ("This is " + loopcount + " number");

it gets an error if I type this myself.
System.out.printIn ("This is " + loopcount + " number");

The errors comes out pointing at the dot saying "cannot find symbol". Is something wrong with my keyboard or something?

I am utterly confused
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Well, yes. Look more carefully at the difference between

print-l-n

and

print-I-n

It also helps if you realize that the method "prints" a "line".
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Hi Tony Jin welcome to Javaranch
As said by Paul, the problem is with the "I" actually is small letter "l" (as in look). And Java is case sensitive.

The errors comes out pointing at the dot saying "cannot find symbol". Is something wrong with my keyboard or something?

The error is shown at the .(dot) because the compiler can resolve the System and the out object but cannot resolve the "printIn" method since there is no such method.
When you see errors like those, first thing to check is typing mistakes, then syntax errors and finally if the variable or method pointed by the error message is really available at that point.

Hope this helps


SCJP, SCWCD.
|Asking Good Questions|
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: The . that I type and copied . are different?
 
Similar Threads
please help with this
how can it be byte?
String separator by fixed length
Repeating Output within a JOptionPane
storing data from a Java Loop