Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,873 questions

51,797 answers

573 users

How to use numeric data types in Groovy

1 Answer

0 votes
int i = 99; 
long l = 930929833L; 
float f = 3.14f; 
double d = 14.6e27; 
BigInteger bi = 28943000000g; 
BigDecimal bd = 9543.982g; 
		
println(i); 
println(l); 
println(f); 
println(d); 
println(bi); 
println(bd); 



/*
run:

99
930929833
3.14
1.46E28
28943000000
9543.982

*/

 



answered Sep 28, 2020 by avibootz

Related questions

1 answer 181 views
1 answer 102 views
2 answers 282 views
282 views asked Oct 7, 2020 by avibootz
2 answers 251 views
251 views asked Oct 7, 2020 by avibootz
1 answer 218 views
218 views asked Oct 7, 2020 by avibootz
2 answers 253 views
253 views asked Oct 7, 2020 by avibootz
...