Created
February 19, 2011 04:36
-
-
Save mrdaemon/834823 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class DicksOnParade { | |
public static void main(String[] args) { | |
Dong aDick = new Dong(); | |
String cockname = aDick.getName(); | |
System.out.println("Dick length: " + cockname.length()); | |
} | |
} |
This file contains hidden or 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
public class Dong { | |
private String name; | |
public void setName(String n) { | |
this.name = n; | |
} | |
public String getName() { | |
return this.name; | |
} | |
} |
This file contains hidden or 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
[0:538] callisto:~ $ javac Dong.java | |
[0:539] callisto:~ $ javac DicksOnParade.java | |
[0:540] callisto:~ $ java DicksOnParade | |
Exception in thread "main" java.lang.NullPointerException | |
at DicksOnParade.main(DicksOnParade.java:7) | |
[0:541] callisto:~ $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment