- Objects
- Classes
- Inheritance
-
Programming in Java on Your Computer - Classes and Objects in BlueJ
- Trying out Code in BlueJ
- The Code for Creating and Using Objects
- Source Code and Methods
- Accessors and Mutators
- Constructor Code
- Scope
- Inheritance
-
BlueJ Review - Class Code
- Simple Debugging
- Interactive Picture
- Refactoring Code with Inheritance
Programming in Java on Your Computer
Its nice to be able to code in the browser, but you get certain benefits by coding Java on your own computer. To do that, you'll need these 3 things installed, which will be discussed below:
- JVM, a.k.a. "Java"
- a compiler (the JDK)
- an IDE (for coding in)
Running Java
Source code is the actual code that you write, which needs to be converted into lower levels of code for computers to actually run it. In Java, the source code is converted into Java Bytecode, which is then run on the Java Virtual Machine (JVM). To run any Java program on your computer, you need to have "Java" installed, i.e. the JVM. You probably have it already, but it can be downloaded here.
To compile your Java source code into Java Bytecode, you need a Java compiler, which is included in the Java Development Kit, or JDK.
Installing the JDK on your Computer
Update: You can now download the JDK with BlueJ from the BlueJ website. This is the easiest way to get everything set up.
Windows
If you want, you can install the JDK on its own.

Mac
Recent version of Mac come with the JDK pre-installed.
The IDE
Technically, you could now code in your computer by:
- writing your source code in notepad and..
- compiling and running it from the command line.
While its a good idea to learn how to do that at some point, its more convenient to write and compile your code from within an IDE, or integrated development environment. An IDE provides several benefits, such as code completion, that make it useful for programming in a language like Java.
BlueJ
A full-fledged IDE is a bit much to start with, so instead it makes sense to use a beginner IDE, BlueJ. BlueJ comes with standard IDE features to help with programming, and includes some extra features to visualize objects, and to try out things more quickly.
Installing BlueJ
To install BlueJ, visit their page, download the appropriate file for your computer, and open it to run the installer.
In this module we will be working with BlueJ, due to its beginner-friendly features, such as allowing Objects to be interacted with directly. You will eventually learn how to automate some of its features, so you won't need to always manually test out your code.
Challenge
Download and install BlueJ, and then open it on your computer.
Click on Help > Copyright. What is the last word on the first line of the copyright info?
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
kevintaw
Jun 15, 4:39 AMI have installed this software just now
Bolke
Jul 30, 4:59 PMThat was maybe the most challenging problem I have had to do on Learneroo. I wish I could see other people's solutions.