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.
class Example {
static void main(String[] args) {
// Example of an Integer using def
def a = 100;
println(a);
// Example of an float using def
def b = 100.10;
println(b);
// Example of an Double using def
def c = 100.101;
println(c);
// Example of an String using def
def d = "HelloWorld";
println(d);
}
}
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more