Blog Archives
Page 1 of 2
1 2

20 Groovy closure interview Q&As with examples

Method Vs. Closure Q1. What are the differences between a method and a closure? A1. Both methods and closures add behavior, and they basically have a block of code containing expressions and statements within two curly brackets i.e. {…} . … Read more ›...

Members Only Content
Log In Register Home


9 Groovy meta programming interview Q&As

Q1. Is Groovy a dynamic programming language? What does “dynamic programming” mean? A1. Yes, Groovy is a dynamic programming language, and the meta programming is the one that gives this dynamic behavior. Dynamic programming means to change code at runtime or compile-time. … Read more ›...

Members Only Content
Log In Register Home


Cash balance Groovy coding questions & answers

Q1. Can the following code be further improved? A1. Yes, it can be made a bit more elegant with the builder design pattern. For example, we can return the “CashBalance” object from each mathod by adding the keyword “this” to it. … Read more ›...

Members Only Content
Log In Register Home


Groovy method chaining for DSL explained

One of the uses of Groovy is as a DSL (Domain Specific Language). Let’s go through a very simple example step by step. Where are Groovy DSLs used? Gradle is a new and revolutionary build tool, based on the Groovy programming language. Apache Camel is ESB (Enterprise Service Bus), …...

Members Only Content
Log In Register Home


Q1 – Q5 Groovy basics interview Q&A

Q1. What are the key features of Groovy?
A1. Groovy is a powerful, optionally typed and dynamic language aimed at rapid development.

Groovy = Java – verbosity
+ Dynamic Typing (mostly)
+ Closures (instead of Anonymous classes) -> Reusuable & assignable piece of code
+ Domain Specific Language (DSL)
+ Builders
+ Meta Programming
+ Groovy Development Kit
+ Operators can be overloaded

Q2.

Read more ›



Q6 – Q10 Groovy basics interview Q&A

This extends Groovy basics interview questions and naswers Q6. What is the difference between using double quotes and single quotes in Grovvy for the strings? A6. Double quotes are a templatable String, which will either return a GString if it is templated, … Read more ›...

Members Only Content
Log In Register Home


Page 1 of 2
1 2

800+ Java Interview Q&As

Prepare to fast-track & go places
with multi-offers to choose from & increased earning potential. Expand your horizons along the way by taking the road less travelled.
Learn by categories on the go...
Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, etc. Some posts belong to multiple categories.
Top