TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  ImportStatement100Checked automatically with code checker

Synopsis:Fully qualify imports.
Language:Java
Severity Level:5
Category:ImportStatement


Description:

When you want to use class Bar from package foo,there are two possible ways to import it:

import foo.*;

Pros: Potentially reduces the number of import statements.

import foo.Bar;

Pros: Makes it obvious what classes are actually used. Makes code more readable for maintainers.

Decision: Use the latter for importing all Android code. An explicit exception is made for java standard libraries (java.util.*, java.io.*, etc.) and unit test code (junit.framework.*)



Literature References:
Google Android Guidelines