|
The Java Tutorial(c) A Short Course on the Basics Authors: Campione M., Walrath K., Hurnl A. Published year: 2002 Pages: 34-35/125 |
Code Samples
Table 22. Code Samples in Language Basics
Note The section Common Problems and Their Solutions (page 391) contains solutions to common problems Tutorial readers have encountered . |
Chapter 4. Object Basics and Simple Data Objectshttp://java.sun.com/docs/books/tutorial/java/data/index.html This chapter begins with a general discussion about the life cycle of objects. The information presented applies to objects of all types and includes how to create an object, how to use it, and, finally, how the system cleans up the object when it's no longer being used. Next, this chapter shows you how to use objects of the following types. Classes for these objects are provided by the Java platform.
The Java platform groups its classes into functional packages. Instead of writing your own classes, you can use one provided by the platform. Most of the classes discussed in this chapter are members of the java.lang package. [1] All the classes in the java.lang package are available to your programs automatically.
Object Basics and Simple Data Objects The Life Cycle of an Object Creating Objects Using Objects Cleaning Up Unused Objects Summary of Objects Questions and Exercises: Objects Characters and Strings Characters Strings and String Buffers Creating Strings and String Buffers Getting the Length of a String or a String Buffer Getting Characters by Index from a String or a String Buffer Searching for a Character or a Substring within a String Comparing Strings and Portions of Strings Manipulating Strings Modifying String Buffers Strings and the Compiler Summary of Characters and Strings Questions and Exercises: Characters and Strings Numbers The Number Classes Converting Strings to Numbers Converting Numbers to Strings Formatting Numbers Formatting Numbers with Custom Formats Beyond Basic Arithmetic Summary of Numbers Questions and Exercises: Numbers Arrays Creating and Using Arrays Arrays of Objects Arrays of Arrays Copying Arrays Summary of Arrays Questions and Exercises: Arrays Code Samples |
|
The Java Tutorial(c) A Short Course on the Basics Authors: Campione M., Walrath K., Hurnl A. Published year: 2002 Pages: 34-35/125 |
![]() Java The Complete Reference, 8th Edition | ![]() The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition) | ![]() Javau2122 Programming Language, The (4th Edition) | ![]() Effective Java (2nd Edition) | ![]() Head First Java |
![]() Java The Complete Reference, 8th Edition | ![]() The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition) |
![]() Javau2122 Programming Language, The (4th Edition) | ![]() Effective Java (2nd Edition) |
![]() Head First Java |