{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
Image of page 1

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

View Full Document Right 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
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
Image of page 3

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

View Full Document Right 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
Image of page 4
Image of page 5

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern