Groovy Quiz 4 | Data Types


Reference video | Groovy Playground


1 Point for every correct answer | Let’s Get Started

1.

Guess the output

byte b = 10
println b
 
 
 

2.

Guess the output

println Byte.MIN_VALUE
println Byte.MAX_VALUE
 
 
 

3.

Guess the output

long l = 100000L
println l
 
 
 

4.

Guess the output

double d = 1000.002D
println d
 
 
 

5.

Guess the output

char c = "ABC"
println c
 
 
 

6.

Guess the output

def num = 10
println num.getClass().getName()
 
 
 
 

7.

Guess the output

def num = (byte)10
println num.getClass().getName()
 
 
 

16