groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel.Sun" <sun...@apache.org>
Subject Re: About supporting `var` of Java10+
Date Sun, 11 Mar 2018 13:24:52 GMT
As a side note,  `var` of Java10+ supports the following usage[1]:

```
var person = new Object() {
   String name = "bob";
   int age = 5;
};
 
System.out.println(person.name + " aged " + person.age);
```

Cheers,
Daniel.Sun

[1]
http://benjiweber.co.uk/blog/2018/03/03/representing-the-impractical-and-impossible-with-jdk-10-var/




--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Mime
View raw message