Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Last active October 12, 2018 00:37
Show Gist options
  • Save harrisonmalone/f6a7e00b8b46d3f5b2b51184bf230d69 to your computer and use it in GitHub Desktop.
Save harrisonmalone/f6a7e00b8b46d3f5b2b51184bf230d69 to your computer and use it in GitHub Desktop.
basic java class which prints out the object id in the void main
public class Animal {
public Animal(String name) {
name = name;
}
public static void main(String[] args) {
Animal bear = new Animal("bear");
System.out.println(bear);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment