Wombat Classes Basics (Young Developers Series, Part 2)

By Dana Nourie, August 2008

Learn where Java code is written and saved, how classes relate to one another, and how to use the Greenfoot code editor.

In the Wombat Object Basics article, you learned what an object is, what methods are for, and a bit about the syntax that is used in code. In this article, you will learn where that code is written and saved, how classes relate to one another, and you'll learn to use the Greenfoot code editor. In addition, certain words in this article are linked, so you can learn more than is being taught here.

As in the last article, to follow along you will need:

  • The Java SE software installed on your computer
  • Greenfoot installed on your computer

This article is aimed at anyone interested in Java programming who is between the ages of 10-100 and has no programming experience. It is recommended that you have read and followed Wombat Object Basics before moving on in this article.

Where Is the Code?

Now that you understand that Java programs are made up of a lot of Java objects, and they interact through methods that provide the instructions for doing things, you are ready to learn about the code. Let's not waste any time.

Open Greenfoot. If the Wombats scenario is not already open, Click Scenario in the top menu, choose Open, select wombats, and then click Open.

At the top of the world area, right-click wombatWorld and select void populate(). By invoking that void populate() method, you should now see a few wombats and lots of leaves in your wombat world as shown in Figure 1.

Figure 1. Wombat World

Read the rest of this article . . .

Also see:

New to Java Programming Center

Young Developers

The Java Tutorial

Get Started with Java Programming in Facebook


Comments:

Post a Comment:
Comments are closed for this entry.
About

Java Technology Fundamentals are now covered as part of the Core Java Technology Tech Tips. Please go there for more tech tips.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today