Professional Documents
Culture Documents
Packages
Java allows packaging up classes into namespaces These namespaces can be archived into a .jar file Packages can be imported into code and its functionality is absorbed A massive collection of packages forms the class framework that Java is built on
Classes inherit from the Object class which comes from the java.lang package You will see the descriptor Super Class in Java a lot
java.lang Package
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/package-summary.html
Java Packages
List of packages
http://download.oracle.com/javase/1.4.2/docs/api/package-list
Common packages
java.io
http://download.oracle.com/javase/1.4.2/docs/api/java/io/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/io/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/io/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/io/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/io/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/io/package-summary.html
2011 BlueSignet LLC. All rights reserved.
java.math
Contains classes that work with massive numbers Numbers that exceed standard integer and double types are handled in a special way in order to maintain its preciseness Very useful in cryptography, where numbers can be extremely large
java.math :: Overview
http://download.oracle.com/javase/6/docs/api/java/math/package-summary.html
2011 BlueSignet LLC. All rights reserved.
java.net
http://download.oracle.com/javase/1.4.2/docs/api/java/net/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/net/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/net/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/net/package-summary.html
2011 BlueSignet LLC. All rights reserved.
java.util
http://download.oracle.com/javase/1.4.2/docs/api/java/util/package-summary.html
http://download.oracle.com/javase/1.4.2/docs/api/java/util/package-summary.html
http://download.oracle.com/javase/1.4.2/docs/api/java/util/package-summary.html
http://download.oracle.com/javase/1.4.2/docs/api/java/util/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/1.4.2/docs/api/java/util/package-summary.html
java.crypto
Contains classes that perform cryptography operations Drastically simplifies implementing encryption and decryption in applications
http://download.oracle.com/javase/6/docs/api/javax/crypto/package-summary.html
2011 BlueSignet LLC. All rights reserved.
http://download.oracle.com/javase/6/docs/api/javax/crypto/package-summary.html
http://download.oracle.com/javase/6/docs/api/javax/crypto/package-summary.html
2011 BlueSignet LLC. All rights reserved.
Much like we would include an external code file in C/C++, in Java we will import an external package
java.io Example
import java.io.*; class HeyBuddy { public static void main (String[] args) { try { FileWriter fOut = new FileWriter("HeyBuddy.txt"); BufferedWriter buffOut = new BufferedWriter(fOut); buffOut.write("Hey Buddy!\n"); buffOut.close(); } catch (IOException ex) { System.err.println("An exception occured: " + ex.toString()); } } }
2011 BlueSignet LLC. All rights reserved.
The End?
Thank You For Watching!