February 2014
Beginner
1248 pages
62h 25m
English
Figure 8.14 demonstrates a static import. Line 3 is a static import declaration, which imports all static fields and methods of class Math from package java.lang. Lines 9–12 access the Math class’s static fields E (line 11) and PI (line 12) and the static methods sqrt (line 9) and ceil (line 10) without preceding the field names or method names with class name Math and a dot.
Read now
Unlock full access