SARAVANAN SIVAJI

Dedicated to JAVA Technologies

Java 5.0 Features Part 2 – static imports

Posted by SARAVANAN SIVAJI on October 9, 2010

2 Responses to “Java 5.0 Features Part 2 – static imports”

  1. chitresh said

    when you are importing system.out why are we again giving out.println??

  2. SARAVANAN SIVAJI said

    @ Chitresh,

    Hi Chitresh,

    Without “out” variable we can’t call println() method.

    If you look java.lang.System class, you can see the reference variable “out” for the PrintStream class has been declared as static variable.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.