SYSC 2004 Lecture Notes - Lecture 8: Java Class Library, Bluej, Information Hiding

66 views2 pages

Document Summary

A class called experiment has one field, called samples, which stores a reference to an array of integers. The constructor creates an array of length 10 and stores the reference to the array in samples. The class has a method with signature: public int occurrences(int target). Chapter 5, more sophisticated behaviour, sections 6. 1 - 6. 5, 6. 10 - 6. 15, and 6. 18 (some topics in the other sections will be covered later) Thousands of classes supplied with java (too many to memorize) Using existing classes is central to oop - a competent programmer must be able to use them. You should know some important classes by name know how to discover and understand other classes. Remember: to use a class we need to know its interface, not its implementation. Classes from the library must be imported except classes in package java. lang. Can import all classes from a package: import java. util. Documentation for classes shipped with java is provided as html pages.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions