code

Comments

Submitted by GeePee on
Introduction: Welcome to a tutorial on the use of comments within Java. What are comments? Comments are just like the standard definition of comments anywhere in the world, they are used to explain something within the midst of the code. Comments are not read by Java and as such do not affect the program running. When are comments used? Comments are normally used to either make a note for the developer their self so they know where they need to go back to, or bookmark a specific location within a Java file.

While Statements

Submitted by GeePee on
Introduction: This page will show you how to use the While statement. What is the While statement? The While statement is used to run a block of code/script constantly until its conditions become false. When is a While statement used? A while statement is great for multi-tasking in programs, for example; while the character is moving in a game it should run a script to update the screen graphics/player co-ordinates or location. How to make a While statement: To make a While statement there are only two things you need to th

Multi-Dimensional Arrays

Submitted by GeePee on
Introduction: Welcome to the Java tutorial on Multi-Dimensional Arrays. I would highly recommend you have a look at my Arrays page before reading through this one! What is a Multi-Dimensional Array? A Multi-Dimensional Array is an array which contains more than one index at any given placement. For example; instead of just having a value at the index "3", we could have "3""0", "3""1" etc. When are Multi-Dimensional Arrays Used? Compared to arrays there are not used as often.

Arrays

Submitted by GeePee on
Introduction: Welcome, this page will teach you about Arrays within Java. What is an Array? An array is a variable which holds more than one value, in effect, it's a list of values attached to a variable name. When are Arrays Used? Arrays are very useful for holding lists of values for certain scripts. For example; holding the id of each button that has been activated within a game.

Object Oriented Programming (Code)

Submitted by GeePee on
Introduction: Hello and welcome to a tutorial on Object Oriented Programming, with code examples as opposed to theory. Ready the theory page Before starting this page make sure you have read and understand the theory page which can be found here. Instances The use of OOP is to have multiple instances of one class running at the same time, each with it's own variables and methods.

Setting Up JFrame/Program Window

Submitted by GeePee on
Introduction: Hello. This page will teach you how to use JFrames within Java. What is a JFrame? A JFrame is a Java component which is able to hold or contain multiple more components. The JFrame is the 'window' of the program (the outer part which has the re-size options, the minimize, maximize and close options as well as the title of the program and icon). Should I use a JFrame in my program? You should only use a JFrame if you need a GUI/UI in your program.

ArrayLists

Submitted by GeePee on
Introduction: Welcome! This tutorial will teach you about how to create and use ArrayLists. What are ArrayLists? ArrayLists, normally referred to as just Arrays, is a type which can contain multiple items. For example; a shopping list could be referred to as an array or shopping items. ArrayLists must be made up of one type only. You are unable to mix and match different types within one ArrayList such as String and Integer.

For Loops

Submitted by GeePee on
Introduction: This page will teach you about the For loop in Java. What is the for loop? The for loop is very useful in many programming languages. It is a simple way to re-run a certain script or part of code multiple times depending on integer values. How do I create a for loop? First you will need to decide five things to create your for loop: 1. The variable name, this will be the reference of integer within the loop. 2. The starting value. 3. The ending value. 4. What will happen for each time the script loops. 5.

Assignment + Equality and Relational Operators

Submitted by GeePee on
Introduction: Welcome! This page will teach you about Equality and Relational Operators as well as the Assignment Operator. What is an Operator? Operators within Java are signs used to manipulate a variable. Depending on what type of Operator is in use will determine the outcome. What is an Equality and Relational Operator? Equality and Relational Operators are used to check if a variable is a value.