I have a question about importing classes. It seems you can call the reduced line method if you imported the class. I do not understand what this operation is called, and how it is possible ...
For instance:
Why is this code
public class test { public static void main (String args[]) { System.out.print("Test"); } }
Can be replaced by
import static java.lang.System.out; public class test { public static void main (String args[]) { out.print("Test"); } }
What happens if you have an object named "out"?
Thanks in advance
source share