June 2018
Beginner
722 pages
18h 47m
English
To avoid using the fully qualified class or interface name in the code, we can add an import statement in the space between the package declaration and class or interface declaration:
package com.packt.javapath;import com.packt.javapath.something.SomeClass;public class MyClass { //... SomeClass someClass = new SomeClass(); //...}
As you can see, the import statement allows avoiding usage of the fully qualified class name, which makes the code easier to read.
Read now
Unlock full access