Skip to content

Instantly share code, notes, and snippets.

@smolin
Created March 6, 2017 16:33
Show Gist options
  • Save smolin/2ae918d3139059396dcf22d7600dbef8 to your computer and use it in GitHub Desktop.
Save smolin/2ae918d3139059396dcf22d7600dbef8 to your computer and use it in GitHub Desktop.
Simple Java Cheat Sheet
# Hello World
public class YourName {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
# Fundamental data types and examples
int 99 boolean true char 'a'
# Variables are declared
int i;
# and may be initialized
int i = 99;
# Comments
// end-of-line
/*
** multi-line
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment