Good morning.
Why this does not work?
import java.lang.System;
out.println("Hola mundo");
Sorry I can not put the full code, but I'm from the cell.
Thank you very much.
Good morning.
Why this does not work?
import java.lang.System;
out.println("Hola mundo");
Sorry I can not put the full code, but I'm from the cell.
Thank you very much.
Basically you have to refer to which class the property out
belongs to. As much as you care about it, Java does not recognize out
, so you'll have to do:
System.out.println("Hola mundo");
If you want to simplify it, you could do something like this:
import java.io.PrintStream;
public class HelloWorld
{
static PrintStream imprimir = System.out;
public static void main(String[] args)
{
imprimir.print("HOLA");
imprimir.print(" MUNDO");
}
}