This is the 1st HTML5 slant canvas

KIWY logo depicting a kiwi bird with a candle

k i w y

Need a light for your site?

This is the 2nd HTML5 slant canvas

Syntax

Common Java Vocabulary

Statements

Statements in Java are made up of:

Escape Sequences

String and character literals can contain special escape sequences that represent single characters that cannot be represented with a single character in code.
Escape
Sequence
Meaning
\n newline
\t tab
\b backspace
\r carriage return
\" double quote
\' single quote
\\ backslash

Variables

Every variable has a:

Rules for names of identifiers

Built-in Data Types

Declaring Variables

Format:
  datatype variableName

Always starts with a type!

  int x;
  float y;
  char ch;
  bool answer;
  int x = 5;	        // can initialize variable on the declaration line
  char item = 'A';
  int a, b, c;           // can also list several variables in one declaration 
                         //  statement, separated by commas
  float a=3.4, b=5.1, c;  

A variable can be declared constant by using the keyword final - must initialize in the same statement

  final double PI = 3.14159;