genzou #6485(2008/06/13 21:08 GMT) [ Groovy ] Rating0/0=0.00
jdk1.6に付属されていた サンプルソース「Intro.java」を解析しました。
[a] = 1557 [e] = 2746 [i] = 2116 [l] = 1008 [n] = 1981 [r] = 1314 [s] = 1209 [t] = 2340
e,s,tが多いのは、 setter、getterメソッドのためでしょうか。 int,String などもキーワードからも、 i,r,tは多いのでしょうか。
1 2 3 4 5 6 7 8 9
def text = new File("c:/Intro.java").text (0..(text.size()-1)).collect{ text[it] }.unique().sort().each{ def key = "[${it}]".padLeft(5) def value = text.count(it).toString().padLeft(7) println "${key} = ${value}" }
Rating0/0=0.00-0+
[ reply ]
genzou
#6485()
[
Groovy
]
Rating0/0=0.00
jdk1.6に付属されていた サンプルソース「Intro.java」を解析しました。
e,s,tが多いのは、 setter、getterメソッドのためでしょうか。 int,String などもキーワードからも、 i,r,tは多いのでしょうか。
def text = new File("c:/Intro.java").text (0..(text.size()-1)).collect{ text[it] }.unique().sort().each{ def key = "[${it}]".padLeft(5) def value = text.count(it).toString().padLeft(7) println "${key} = ${value}" }Rating0/0=0.00-0+
[ reply ]