Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Variable out of type PrintStream" error occured

Tags:

java

I'm starting to learn Java and have encountered some issues.

public class Hello {
    public static void main(String[] args) {
        System.out.printIn("Hello");
        }
    }

Using Notepad++. have the SDK. to compile I used javac Hello.java, but it resulted with the following error:

Symbol: method PrintIn

Location: Variable out of type PrintStream

like image 616
wadie Avatar asked Nov 27 '22 03:11

wadie


1 Answers

Your error is just a typo, happens even to the best of us:

Use a lowercase 'L' instead of an uppercase 'I'; in some IDE's the two look very analogous!

System.out.println("Hello");

Remember: println() stands for "print line".

P.S. I would recommend a better IDE software such as NetBeans or Eclipse. Both of these catch syntax errors so you don't have to worry.

like image 142
fireshadow52 Avatar answered Dec 05 '22 18:12

fireshadow52