development-programming-language-java.html


* created: 2025-09-21T15:42
* modified: 2025-10-23T18:13

title

Java :|

description

Java is a language you could use.

related notes

Java is a language

Java is a language that promises to run everywhere (that supports the Java runtime). It is a language that has a syntax. It is a language some people use. It is a language I'm not really excited about.

File Structure

Java follows a pretty basic schema, where each class is located in its own files which shares the same name.

Example: public class HelloWorld { ... } would be found in HelloWorld.java

Semantics && Syntax

Java is a object oriented langues, meaning it is based around classes.

Variables

Variables are defined using the type followed by an identifier.

SomeClass myClass;

Assigning a value to a variable is done by the use of the = symbol.

myClass = new SomeClass();

Key words

TODO: labels (break search)

Primitive datatypes

Typecasting

Java allows for safely cast from a smaller space to a larger space without explicit casting.

Example: byte -> short -> int

Operands

Comments

Doc comments contain general information about the program and it's functionality. These can include:

Example:

/** 
 * A Java program.
 * 
 * @author  Thomas P. (thomas@example.com)
 * @version 1.01, 09/2025
 */ 

Inline comments are commonly used to provide some context to the reader. Example:

// This implementation is trash. 

Arrays

Error handling

Exception

When to throw an Exception:

Error

When to throw an Error:

Tooling

OpenJDK: The Open Java Development Kit is an implementation of Java Standard Edition. It encompasses tools and library's required to work-on and compile Java projects like: