Skip to content

Instantly share code, notes, and snippets.

@hsanger
Last active July 7, 2017 13:21
Show Gist options
  • Save hsanger/a42ebc866bf359cd271509ab9b3dcd68 to your computer and use it in GitHub Desktop.
Save hsanger/a42ebc866bf359cd271509ab9b3dcd68 to your computer and use it in GitHub Desktop.

Classes: A type of something. You can create new Objects of a certain class. Example: Animal animal = new Animal();

Entry point:

Where your program starts. The entry point in Java is:

public static void main(String[] args) {}

String:

A length of text. Example:

"Hello World!"

Variable:

Like a box which stores a value. Example:

int hello = 0;

You can also do this:

int hello;

But then to use it, you need to give it a value:

hello = 0;

Variables can be objects, too. E.g.:

Dog d = new Dog();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment