Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Groovy Online

/* Hello World in Groovy */
println("Hello world")


class Hello{
    String tableName;
    String columnName;
    public Hello(String tableName,String columnName){
        this.tableName=tableName
        this.columnName=columnName
    }

    
}

ArrayList<Hello> ar=new ArrayList<Hello>();

Hello h1=new Hello('t1','c1')

Hello h2=new Hello('t1','c2')
Hello h3=new Hello('t1','c3')
Hello h4=new Hello('t1','c4')
Hello h5=new Hello('t1','c5')

Hello h6=new Hello('t2','c1')
Hello h7=new Hello('t2','c2')
Hello h8=new Hello('t2','c3')
Hello h9=new Hello('t2','c4')
Hello h10=new Hello('t2','c5')

ar.add(h1)
ar.add(h2)
ar.add(h3)
ar.add(h4)
ar.add(h5)

ar.add(h6)
ar.add(h7)
ar.add(h8)
ar.add(h9)
ar.add(h10)

println ar

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.