Int

Return Keyword

Introduction: Welcome! This tutorial page will teach you about the "Return" keyword in Java. What is a 'keyword'? A keyword is a word which already has a set/pre-defined action within Java. For example; public is a keyword which allows other classes to access the public variable or function/method. So, what does the "Return" do? Return is used to send a value back from a method or function to the place where it was called. The type of value to return depends on the type of method the return keyword is encased in.

Arrays

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.

If, Else and Else If Statements

Introduction: Hello. In this tutorial you will learn about the if, else and else if statements. When are these statements used? The if statement is used to check if certain conditions are true. For example, just like we would say in English, if the time of day is noon we should eat lunch, else we shouldn't. So, what is else if? Since the if statement is used to check if certain conditions are true and else is for the opposite, what else do we need? To be able to check multiple times if certain conditions are true, but not the same.

Variables

Introduction: Hello! This tutorial will teach you about variables. What are variables? Variables are pieces of data which are used to store more data. Every variable has a type, a name and a value; if the variable does not have a value then its value is 'null' or 'nothing'. What types can variables be? There are a few different types of variable, the most common ones being: - String - Double - Int (Integer) - Long - Boolean A string is a piece of text containing letters, numbers and symbols.

Data Types in Java

This tutorial will teach you how to understand what are the variables in java. A data type refers to the type of data that can be stored in a variable, means that a variable needs a data type to save space in the memory for allocation. So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of variables.java. 2. Now, we will initialize variables with their own data types in java. An int data type contains a whole number.