简单的groovy使用
class Account {
def number;
def balance ;
def display(){
println "Account:${number} ${balance}";
}
}
class Student {
def display(){
println "Student:${regiser} ${name}";
}
def regiser;
def name ;
}
def group = [new Account(number:222222,balance:22222),new Student(regiser:"郝启敏",name:"ln")];
group.each{item->item.display();}
690

被折叠的 条评论
为什么被折叠?



