In this document, words occurring in angle brackets (like <this>) are things that should be replaced with what you want the code to do.
The basic types are char, int, and double.
Java variable names and function names can have be number of letters, digits, and underscores, but they should begin with a letter. Case of letters matters.
// <stuffExplainingYourProgram>
public static <returnValueType> <functionName>( <parameterList> ) { <variableDeclarations> <statementsToDo> }
<typeName> <variableName>;
<typeName>[] <variableName> = new <typeName>[<arrayLengthExpression>];
return <returnValueExpression>;
<variableToBeChanged> = <valueToGiveItExpression>;
if( <condition> ) { <statementsToDoIfConditionTrue> }
if( <condition> ) { <statementsToDoIfConditionTrue> } else { <statementsToDoIfConditionFalse> }
if( <condition> ) { <statementsToDoIfConditionTrue> } else if( <otherCondition> ) { <statementsToDoIfOtherConditionTrue> } else { <statementsToDoIfNoneAreTrue> }
while( <condition> ) { <statementsToDoWhileConditionTrue> }
for( <initializeAssignment> ; <condition> ; <updateAssignment> ) { <statementsToDoWhileConditionTrue> }