You are on page 1of 2

Groovy programming

Which of the following code has an error in it? println(Hello World)
What are the dependencies for Groovy at runtime? All
The following are features of Groovy. all
Groovy code is compiled to byte code that is executed by the Java Virtual Machine (JVM). TRUE
What is the limitation of Groovy? all the option

In Groovy map, each element will be mapped to a key

What will be the output for the following code?
100
def example = 1..100
println(example.getTo())
Which Class in Groovy specifies the instant date and time Date
What will be the output for the following code?
[Name,colour]
def flower = ["Name" : "Jasmine", "Colour" : "White"] 
println(mp.keySet()); 
Groovy invokes Methods during _______ time. Run
For in' loop is used with All
‘Semicolon’ is mandatory in Groovy. FALSE

All the packages and classes in Groovy is imported by default, you do not have to use 
TRUE
the import statement explicitly

print all the line in 
The built-in method "eachLine" is used to
the file

It is necessary to pass parameters while calling a parameterized method in Groovy. FALSE

If the type of exception is not declared, any type of exception can be catched TRUE

In groovy all methods and classes are--------------by default Public
In which of the following applications Groovy is used? All
Keyword used to define a variable or method is def
Groovy can be used as a scripting language. TRUE
In while statement, the statement would be executed first and the condition would be e
FALSE
valuated next.
xml markup builde
Which class is used to create an XML document
r

Return statement is mandatory in Groovy methods. FALSE

Expandoclass in Groovy are inherited by default TRUE
Automatic Resource Management or ARM block from java 7 are supported in Groovy
FALSE
.

You might also like