Groovy Quiz 22 | Input & Output Reference video | Groovy Playground 1 Point for every correct answer | Let’s Get Started 1. Following statement is used to get a String input from the console System.console().readLine() True False 2. Following statement is used to get an Integer input from the console System.console().readLine().toInteger() Yes No 3. Guess the output def myName = "Raghav" println "My name is $myName" printf "My name is %s", myName My name is Raghav My name is Raghav My name is Raghav My name is %s My name is $name My name is Raghav 4. printf "%s | %d | %.2f ", ["Raghav", 10, 20.22] Raghav | 10 | 20.22 null exception 5. padding printf "%-10s | %10s", ["Raghav", "Groovy"] Raghav | Groovy Raghav | Groovy exception Loading … 9 Share this:TwitterFacebookLinkedIn Related