JavaAPI - CI S3023 Pr ogr amming Fundament als for CI S M...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: CI S3023: Pr ogr amming Fundament als for CI S M ajor s I I Summer 2010 Java API “ A nd you guys wer e putti ng J ava i n l i ght bul bs and ever ythi ng el se. ” -Steve J obs Cour se L ectur e Sl i des 7 J une 2010 Ganesh Viswanathan 5/27/11 Java Library • Oracle (earlier Sun) ships hundreds of pre-built classes • This set of classes is called the Java library or the Java API 5/27/11 22 Packages • Classes are grouped into packages • Packages are hierarchical you can have packages within packages. • Example java.lang.M at h indicates that Math is a class in the package lang and that 5/27/11 33 Some Java Packages java.lang java.util general utility classes like Arrays, Date, Calendar, etc. java.io File I/O classes java.awt GUI development javax.swing GUI development java.net 5/27/11 includes most fundamental classes like System, String, Math, etc. low-level internet I/O 44 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 5/27/11 55 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 : http://java.sun.com/javase/6/docs/api/index.html • Click on the package name and then the class name to know about what that class can do for you 5/27/11 66 ...
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 - CI S3023 Pr ogr amming Fundament als for CI S M...

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