JavaAPI - java.net low-level internet I/O Using a class...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS3023: Programming Fundamentals for CIS Majors II Summer 2010 Ganesh Viswanathan Java API Course Lecture Slides 7 June 2010 “ And you guys were putting Java in light bulbs and everything else. ” --Steve Jobs
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Java Library Oracle (earlier Sun) ships hundreds of pre- built classes This set of classes is called the Java library or the Java API 2
Background image of page 2
Packages Classes are grouped into packages Packages are hierarchical you can have packages within packages. Example java.lang.Math indicates that Math is a class in the package lang and that lang is a package in the package java . 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Some Java Packages 4 java.lang includes most fundamental classes like System, String, Math, etc. java.util general utility classes like Arrays, Date, Calendar, etc. java.io File I/O classes java.awt GUI development javax.swing GUI development
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: java.net low-level internet I/O Using a class from Java API Find out which package the class is in Put an import statement at the top of your source code file Example: import java.util.Arrays; import java.util.*; Now you can use the class and its methods If you do not have the import statement, you can still use the class, but every time you will have to qualify the class name with the package information. For example, java.util.Arrays.sort() 5 Knowing about Java API How do you know what classes are there in Java API or methods are there in a class in Java API Go to : Click on the package name and then the class name to know about what that class can do for you 6 http://java.sun.com/javase/6/docs/api/index.html...
View Full Document

This note was uploaded on 05/27/2011 for the course CIS 3023 taught by Professor Dobbins during the Summer '08 term at University of Florida.

Page1 / 6

JavaAPI - java.net low-level internet I/O Using a class...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online