Skip to content

Instantly share code, notes, and snippets.

@bennybennet
Last active December 11, 2015 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennybennet/4602846 to your computer and use it in GitHub Desktop.
Save bennybennet/4602846 to your computer and use it in GitHub Desktop.
Example Java class
package de.bennybennet.examples;
public class Example extends Parent {
String exampleVarPP = "I'm only visible for every class in this package.";
private String exampleVarPriv = "I'm only visible for this class";
public Example() {
System.out.println("...entered the constructor");
}
public String getExampleVarPriv() {
System.out.println("...entered method of Example: Getter exampleVarPriv.");
return this.exampleVarPriv;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment