Java Programming   Java Programming
 |Sofia Home | Content Gallery |
Home
Syllabus
Schedule
Lessons
Assignments
Resources

Lesson 3 - Data and Object Attributes

In the previous section, you learned how to create your own Java classes by defining fields and methods. In this lesson, you'll learn about the fundamental elements that are used to create the attributes inside every Java object and how to manipulate those elements using expressions. You'll also meet two new Java objects, the Button and the TextField, that will let your users supply you with data for your interactive applets.

Lesson 3 sections are as follows:

3.1 Numbers Learn to use Java's primitive numeric types: byte, short, int, long, float and double.
3.2 Characters Learn about Unicode and Java's char data type as well as Java's String class.
3.3 Expressions Learn to use Java's rich set of operators to manipulate primitive types.
3.4 Buttons & Text Use Java's Button class to trigger actions and the TextField class to capture input.
3.5 Numeric Input Learn how to convert textual user input into numbers that can be used in expressions.
3.6 Output Formatting Learn how to display numeric and date values in a variety of different formats.

Continue with section 3.1 Numbers

Back to Top
Content Developed by Stephen Gilbert, Licensed under a Creative Commons License
Published by the Sofia Open Content Initiative
© 2004 Foothill-De Anza Community College District &The William and Flora Hewlett Foundation