Groovy Language In Java! Trivia Questions Quiz

12 Questions | Attempts: 234
Share

SettingsSettingsSettings
Java Quizzes & Trivia

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
  • 1. 
    (Fill in the blank) In Groovy the == operator tests for ______ equality.
  • 2. 
    (T/F) Groovy supports Java's primitive types.
    • A. 

      True

    • B. 

      False

  • 3. 
    Identify the valid Groovy strings below.
    • A. 

      'I\'m a string'

    • B. 

      "I'm a string"

    • C. 

      /I'm a string/

    • D. 

      All of the above

  • 4. 
    (T/F) You must set a run-time property (-enableassertions) in Groovy to enable assertion checks.
    • A. 

      True

    • B. 

      False

  • 5. 
    (Fill in the blanks) In order to use variable interpolation within a string, the string must be enclosed in ______ ________.
  • 6. 
    Following the assignment def x = 2/3;  what it the type of variable x?
    • A. 

      Integer

    • B. 

      Rational

    • C. 

      BigInteger

    • D. 

      BigDecimal

  • 7. 
    (T/F) Groovy has a literal form for a map object.
    • A. 

      True

    • B. 

      False

  • 8. 
    (Fill in the blank) In Groovy checked exceptions are translated into ________ exceptions.
  • 9. 
    The best place to look to see how Groovy "fills in the cracks" of the standard Java libraries is to look:
    • A. 

      In the Java Development Kit (JDK) javadoc

    • B. 

      In the Groovy Development Kit (GDK) javadoc

    • C. 

      In the pure Groovy library javadoc

  • 10. 
    Which tool provides a GUI for writing simple Groovy programs?
    • A. 

      Groovysh

    • B. 

      GroovyConsole

    • C. 

      Groovy

  • 11. 
    A Groovy variable can have either a static or a dynamic ____ depending on how it is declared.
  • 12. 
    The =~ operator and the ==~ operator have the same semantics
    • A. 

      True

    • B. 

      False

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.