Chapt 02
Chapt 02
Interface
Interface
Interface
IMPLEMENTER
Interface
components
java.io Provides support for file and other I/O operations.
java.lang
Provides the fundamental Java classes.
Class details
This package is auto-imported by the compiler.
java.math Provides support for arbitrary-precision arithmetic
Organized into
java.security Provides support for the security framework.
Provides support for databases access over JDBC
packages and
java.sql JDBC = Java Database Connectivity,
SQL = Structured Query Language
Examples java.util
Miscellaneous utility classes including JCF.
JCF = Java Collection Framework
java.util.Scanner javax.servlet
Provides support for servlet and JSP development.
JSP = Java Server Pages
javax.swing
Provides support for GUI development.
GUI = Graphical User Interface
javax.xml
Provides support for XML processing.
EECS1020 F14 (Steven C.)
XML = eXtensible Markup Language 17
Indicate use of Java Standard Library (other than
java.lang.*) or other Java library (e.g., TYPE)
Import one or all classes in a subpackage (using *)
Import statement syntax
import package.subpackage.class; // imports a single
class
import package.subpackage.*; // imports all classes in
subpackage
Example
import java.util.Scanner; // imports only the Scanner
class
import type.lib.*; // imports all classes in the lib
subpackage
next() nextInt()
Returns the next word Parses next token as int
nextLine() nextDouble()
Returns the next line Parses next token as double
nextBoolean() nextLong()
nextChar() nextFloat()
Memorize it