• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error while compiling  RSS feed

 
Paul Akhimien
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:Try searching on the Web: I'm sure that you can find tutorials about using the Windows command prompt, which will explain the basic commands such as 'cd', 'dir' and others.


Thank Jesper have been able to get some good videos ...
I tried running this code
class HelloWorldApp{
    public static void main(String[] args) {
System.out.printIn("Hello World!"); // Display the string.
    }
}

but I get this error instead

C:\Users\User\Desktop\JavaWork>javac HelloWorldApp.java
HelloWorldApp.java:3: error: cannot find symbol
        System.out.printIn("Hello World!"); // Display the string.
                  ^
  symbol:   method printIn(String)
  location: variable out of type PrintStream
1 error

please how do I go about it where is my mistake. Thanks .
 
Tim Cooke
Marshal
Posts: 3873
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
printIn

Are you sure this is syntactically correct? It's worth double checking.
 
Carey Brown
Bartender
Posts: 3001
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
misspelled println(), it's a lower case 'L' not an upper case 'I'.
 
Fred Kleinschmidt
Bartender
Posts: 560
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also did not import java.lang.System
 
Daniel Cox
Ranch Hand
Posts: 231
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred Kleinschmidt wrote:Also did not import java.lang.System

Is this import necessary?
 
Arco Brouwer
Ranch Hand
Posts: 44
2
IntelliJ IDE Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daniel Cox wrote:
Fred Kleinschmidt wrote:Also did not import java.lang.System

Is this import necessary?


As far as I learned everything in java.lang is automatically considered to be imported and so will System.out.println().
In simple programs I never use this import and they will compile fine.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!