I have a simple code:
public class Hello
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}
I know that Object
class is imported by default in every java program, but I wanted to ask whether PrintStream
class is also imported by default if we are using print()
or println()
functions?
Because Object
class belongs to java.lang
package and PrintStream
class belongs to java.io
package, so if it is not imported by default, then how we are able to use the println()
method of PrintStream
class?
If it (PrintStream
class) is not imported by default, then why the decompiler is importing it?