![]() Programming Center Supplement Welcome to the Java Developer ConnectionSM New-to-Java Programming Center Supplement! This monthly supplement provides a way for you to learn the basics of the Java programming language, discover new resources, and keep up-to-date on the latest additions to the JDC's New-to-Java Programming Center. CONTENTS
1. Java Programming Language Basics
3. Making Sense of the Java Class Libraries
4. Java Bits
5. New to Java Technology Forum Latest
7. Program Challenge Solution and Explanation
8. Downloading the Java 2 Platform Java Programming Language BasicsCreating an array:
An array is an object or data structure that holds multiple elements of the
same type. Arrays are frequently used in applications that need a grouping of data
assigned to one variable. A calendar application, for
instance, might have a variable called "days" holding the Once an array is created its length is established and fixed. The following examples define three arrays:
Access array-specific elements by position, or using a
You can also copy data from one array to another, and create subarrays or multidimensional arrays. Program Challenge
Create a application called
Your application should produce something similar to these results: The average of the scores is 87.4 96.0 is the fourth element in the scores array. There are 5 elements in this array. The solution and links to more information are at the bottom of this supplement. Making Sense of the Java Class LibrariesThe System class explained:
In the Program Challenge you use
But
System.out.println("Prints this text to the screen.")
Other useful methods of the System class:
Java BitsWhat is the Java Platform?The Java 2 Platform is an environment for running and developing programs written in the Java programming language. The Java platform has two components:
The Java platform consists of the Java API, a large collection of ready-made software components, and a Java runtime environment. Most browsers include a JVM, so you are running the Java platform when you use these browsers, but you also create a Java platform when you download and install the latest version of the Java 2, Standard Edition (J2SE). This download also includes necessary development tools such as a compiler, a Java application launcher, appletviewer, and more. New to Java Technology Forum Latestpepsivscoke wants to know:How do I color components? Do you know a possible solution? See: the Forum to respond to this question.
For More InformationThe Java Tutorial Trail: Learning the Java Language, Arrays Tech Tips: Manipulating Arrays Java 2 Platform SE version 1.3 specification: Class System Java Tutorial: Using the System Class Java Tutorial: Miscellaneous System Methods Java 2 SDK, Standard Edition, version 1.3 specifications: Summary of New Features and Enhancements Program Challenge SolutionThis is one possible solution to the Program Challenge:
Were you surprised that the fourth element printed Arrays are useful for holding multiple elements of a single data or object type, but they have limits. You can not add more elements dynamically. Instead, you can create a different kind of storage container, similar to an array, called a Vector. Read about Vectors in next month's issue of the JDC New-to-Java Programming Center Supplement. Downloading the Java 2 PlatformFor most Java development, you need the class libraries, compiler, tools, and run-time environment provided with the Java 2, Standard Edition development kit.
Bookmark the specifications Have a question about programming? Use Java Online Support. - Note - Sun respects your online time and privacy. The Java Developer Connection mailing lists are used for internal Sun Microsystems purposes only. You have received this email because you elected to subscribe. - Unsubscribe - To unsubscribe to this newsletter, go to the subscriptions page uncheck the "JDC New-to-Java Supplement" checkbox, and click "Update". - Subscribe - To subscribe to other JDC mailings, go to the subscriptions page choose the newsletters you want to subscribe, and click "Update". - Feedback - Comments? Send your feedback on the JDC Newsletter to: jdc-webmaster - Copyright -
Copyright 2001 Sun Microsystems, Inc. All rights reserved. This document is protected by copyright.
JDC New-to-Java Programming Center Supplement 1 As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform. | |||||||||||||||
|
| ||||||||||||