Last active
December 11, 2015 12:48
-
-
Save bennybennet/4602846 to your computer and use it in GitHub Desktop.
Example Java class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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