Main Page

Previous Next

Chapter 4: Arrays and Strings

Overview

In this chapter you will start to use Java objects. You will first be introduced to arrays, which enable you to deal with a number of variables of the same type through a single variable name, and then you will look at how to handle character strings. By the end of this chapter you will have learned:

  • What arrays are and how you declare and initialize them.

  • How you access individual elements of an array.

  • How you can use individual elements of an array.

  • How to declare arrays of arrays.

  • How you can create arrays of arrays with different lengths.

  • How to create String objects.

  • How to create and use arrays of String objects.

  • What operations are available for String objects.

  • What StringBuffer objects are and how they relate to operations on String objects.

  • What operations are available for StringBuffer objects.

Some of what we discuss in this chapter relates to objects, and as we have not yet covered in detail how a class (or object definition) is defined we will have to skate over some points, but all will be revealed in Chapter 5.

Previous Next
JavaScript Editor Java Tutorials Free JavaScript Editor


Bitcoin Dice - Crypto Casino . Click here