This trivia questions quiz tests your knowledge in Groovy Language in Java! The language is similar to those of Python, Ruby, and Smalltalk and it is quite interesting to study as a programmer. The quiz below is perfectly designed to see just how much you know about using the language. Give it a shot and see how well you will do.
Questions and Answers
(Fill in the blank) In Groovy the == operator tests for ______ equality.
(T/F) Groovy supports Java's primitive types.
Identify the valid Groovy strings below.
'I\'m a string'
"I'm a string"
/I'm a string/
All of the above
(T/F) You must set a run-time property (-enableassertions) in Groovy to enable assertion checks.
(Fill in the blanks) In order to use variable interpolation within a string, the string must be enclosed in ______ ________.
Following the assignment def x = 2/3; what it the type of variable x?
(T/F) Groovy has a literal form for a map object.
(Fill in the blank) In Groovy checked exceptions are translated into ________ exceptions.
The best place to look to see how Groovy "fills in the cracks" of the standard Java libraries is to look:
In the Java Development Kit (JDK) javadoc
In the Groovy Development Kit (GDK) javadoc
In the pure Groovy library javadoc
Which tool provides a GUI for writing simple Groovy programs?
A Groovy variable can have either a static or a dynamic ____ depending on how it is declared.
The =~ operator and the ==~ operator have the same semantics
This is the ultimate Java test for all those Java developer-wannabes who have just began practicing the programming language. It consists of over 93 questions of basically Core Java. So, if you are one of them and want to have a...
Questions: 93 | Attempts: 19069 | Last updated: Mar 22, 2022