Groovy Quiz 3 | Variables Reference video | Groovy Playground 1 Point for every correct answer | Let’s Get Started 1. What is the keyword used to define a variable var let def 2. Keyword to print data on the console print println both A & B 3. What will be the output of the following snippet def name = "Raghav" println "Name is "+name Name is Raghav Name is name syntax error 4. What will be the output of this snippet def name = "Raghav" println 'Name is ${name}' println "Name is ${name}" Name is ${name} Name is Raghav Name is Raghav Name is Raghav Name is ${name} Name is ${name} 5. Guess the output of def name = "Raghav" name = 10 print name Raghav 10 Raghav 10 6. Guess the output def (a,b,c) = [10,20,30] println a println b println c 10 20 30 10 10 10 error 7. Guess the output def (String a, int b, Double c) = [10,20,30] println a println b println c 10 20 30 10 20 30.0 error 8. Guess the output def (String a, int b, Double c) = [10,20] println a println b println c 10 20 null error 10 10 10 9. Guess the output def (String a, int b) = [10,20,30] println a println b 10 20 error 10. Guess the output def x =10 def X = 20 println x println X 10 20 20 20 10 10 Loading … 23