2014-01-26 00:04:22 +00:00
|
|
|
|
2016-02-27 02:33:05 +00:00
|
|
|
; "You may have done more with Java than you know"
|
2011-07-08 20:57:44 +00:00
|
|
|
(= __ (class "warfare")) ; hint: try typing (javadoc "warfare") in the REPL
|
|
|
|
|
|
2016-02-27 02:33:05 +00:00
|
|
|
; "The dot signifies easy and direct Java interoperation"
|
2011-07-08 20:57:44 +00:00
|
|
|
(= __ (.toUpperCase "select * from"))
|
|
|
|
|
|
2016-02-27 02:33:05 +00:00
|
|
|
; "But instance method calls are very different from normal functions"
|
2011-07-08 20:57:44 +00:00
|
|
|
(= ["SELECT" "FROM" "WHERE"] (map ___ ["select" "from" "where"]))
|
|
|
|
|
|
2016-02-27 02:33:05 +00:00
|
|
|
; "Constructing might be harder than breaking"
|
2011-07-08 20:57:44 +00:00
|
|
|
(= 10 (let [latch (java.util.concurrent.CountDownLatch. __)]
|
|
|
|
|
(.getCount latch)))
|
|
|
|
|
|
2016-02-27 02:33:05 +00:00
|
|
|
; "Static methods are slashing prices!"
|
|
|
|
|
(== __ (Math/pow 2 10))
|