Created
September 5, 2010 09:05
-
-
Save tnoborio/565876 to your computer and use it in GitHub Desktop.
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
(ns hoge.core | |
(:import Hoge)) | |
(def _nil_ nil) | |
(Hoge. _nil_) ; => called Hoge(String) | |
(Hoge. (identity nil)) ; => called Hoge(String) | |
(Hoge. (cast Integer nil)) ; => "called Hoge(String)" | |
(Hoge. nil) ; => Thrown class java.lang.IllegalArgumentException. More than one matching method found: Hoge |
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
public class Hoge { | |
public Hoge(String str) { | |
System.out.println("called Hoge(String)"); | |
} | |
public Hoge(int i) { | |
System.out.println("called Hoge(int)"); | |
} | |
public Hoge(String[] strs) { | |
System.out.println("called Hoge(String[])"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment