+91 90691 39140 | +1 253 214 3115 | info@hub4tech.com | hub4tech

Groovy Interview Questions and Answers

Explain what is Groovy?

Groovy is an object-oriented programming language for JVM (Java Virtual Machines). It is used to combine Java modules, to write Java application and to extend existing Java application.

What are the dependencies for Groovy?

As well as Java 1.4 and the Groovy jar we also depend at runtime on the ASM library.

Mention what relational operators is used for in Groovy?

Relational operators allows you to compare between objects, to check whether the two objects are different or same or if one is less than, greater than or equal to others.

Things work if I use Suns conventions and put { on the same line, but if I add a new line things break?

When using closures with method calls we have some syntax sugar in Groovy which is sensitive to white space (newlines to be precise). Please see this description in common gotchas for a full description.

Why use Groovy?
  • For Java programmers it provides familiar syntax
  • It has a rich stock of Java Libraries
  • It easily integrate with your existing infrastructure like Servlet Containers, App Servers, Loads of databases with JDBC drivers,
  • Completely Object Oriented
  • It possesses a reusable and assignable pieces of code
  • Operators can be overloaded
  • Literal declaration for maps, arrays, ranges and regular expressions
  • It has efficient object navigation
Copyright ©2015 Hub4Tech.com, All Rights Reserved. Hub4Tech™ is registered trademark of Hub4tech Portal Services Pvt. Ltd.
All trademarks and logos appearing on this website are the property of their respective owners.