Apache Groovy Interview Questions & Answer [GUIDE TO CRACK]
Groovy Interview Questions and Answers

Apache Groovy Interview Questions & Answer [GUIDE TO CRACK]

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Lakshana (Sr Technical Manager )

(5.0) | 17212 Ratings 1609
  • Apache Groovy is a Java-syntax-compatible object-oriented programming language for the Java platform.
  • It is both a static and dynamic language with features similar to those of Python, Ruby, and Smalltalk.
  • It can be used as both a programming language and a scripting language for the Java Platform, is compiled to Java virtual machine (JVM) bytecode, and interoperates seamlessly with other Java code and libraries.
  • Groovy uses a curly-bracket syntax similar to Java’s. Groovy supports closures, multiline strings, and expressions embedded in strings.
  • Much of Groovy’s power lies in its AST transformations, triggered through annotations.
  • Groovy 1.0 was released on January 2, 2007, and Groovy 2.0 in July, 2012.
  • Since version 2, Groovy can be compiled statically, offering type inference and performance near that of Java.
  • Groovy 2.4 was the last major release under Pivotal Software’s sponsorship which ended in March 2015.
  • Groovy has since changed its governance structure to a Project Management Committee in the Apache.

FREQUENTLY ASKED INTERVIEW QUESTIONS AND ANSWERS:

1. Explain what Groovy is?

Ans:

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

2 . Why use Groovy?

Ans:

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

3 .What is the limitation of Groovy?

Ans:

  • Groovy can be slower
  • Groovy might need lots of memory
  • Groovy start up time requires improvement
  • It requires Java knowledge
  • It takes sometimes to get use to like New Syntax, closures, default typing,
  • Documentation is thin

4 . Explain how Scripts are run in Groovy?

Ans:

Groovy supports plain script; it does not require a class declaration. At the front of the script, imports are supported at the same way that it can be at the front of a class. In Groovy, you have to use word def  to declare a function outside of a class.

5 . Mention what features Groovy JDK offers?

Ans:

Groovy has added new methods compare to old version like

  • Various array types and object streams with newly Groovy oriented methods

like Object.every(), Object.each() etc. and also include new features like “String BufferedReader.getText()” and “InputStream.eachLine(Closure)”.

6 . Mention what is the role of closure and listeners in Groovy?

Ans:

Groovy does not support anonymous inner classes; it is possible to determine action listeners inline through the means of closures. In Groovy, listeners closure are used as a ListenerAdapter where only one method of interest is overridden.

7 . Explain how you can add stuff to the classpath when running things in groovy or groovysh?

Ans:

You can add things to your $CLASSPATH environment variable.  Another possibility is to build a .groovy/lib directory in your home directory and append whatever jars you want to be available by default.

8 . Mention what is the license for Groovy?

Ans:

Groovy depends at runtime on the ASM library as well as Java 1.4 and the Groovy jar.

9 . Explain what is ExpandoMetaClass in Groovy?

Ans:

ExpandoMetaClass is used to add methods, properties, static methods and constructors. Expandoclass is not inherited by default; you have to call ExpandoMetaClass.enableGlobally().

10 . Explain how a Groovy string is expressed?

Ans:

Groovy string is referred to as G String.

  • It is surrounded by double quotes, for regular strings it uses single quotes
  • It may contain Groovy Expressions noted in ${}
  • Square bracket syntax may be applied like charAt(i)

11 . How could you retrieve a single value from a database using Groovy?

Ans:

To recover a single value from the database you can use the command

row = sql.firstRow (‘select columnA, column from tableName’)

println “Row: columnA = $ {row.columnA} and column = ${row.columnB}”

12 . Explain how you can query in Groovy?

Ans:

Let see a simple example of how Groovy calls out the query

  • import groovy.sql.sql
  • sql = Sql.newInstance (‘jdbc: jtds: sqlserver://serverName/dbName-Class;domain=domainName’,’username’,’password’,’net.sourceforge.jtds.jdbc.driver’)
  • sql.eachRow (‘select * from tableName’) {print “$it.id–${it.firstName} –”  }

13 . Explain how you can build AST (Abstract Syntax Trees) in Groovy from string?

Ans:

You can build AST in Groovy from

  • Strings
  • Code
  • From DSL like specification

An AstBuilder object provides an API to build AST from strings of Groovy Source Code. For example

List<ASTNode> nodes = new AstBuilder (). buildFromString (“\”Hello\” “)

14 . Explain how you can include a groovy script in another groovy?

Ans:

You can include a groovy script with another groovy by using the following code. When put this code at the top of the script it will bring in the contents of a groovy file.

Evaluate(new file(“../tools/Tools.groovy”))

15 . Explain what is Groovysh?

Ans:

Groovysh is a command line application that enables easy access to evaluate Groovy expressions, define classes and run experiments.

16 . Explain GroovyDoc comment?

Ans:

Like multiline comments, GroovyDoc comments are multiline but it starts with a /** and end with */.  Those comments are related with

  • Type definitions (classes, interfaces, enums, annotations)
  • Fields and properties definitions
  • Methods definitions

17 . Explain what Bitwise Operators are in Groovy?

Ans:

Bitwise operators can be implemented on a BYTE or an INT and return and INT. Bitwise operators offer 4 bitwise operators

  • &: bitwise “and”
  • I : bitwise “or”
  • A : bitwise “xor”
  • ~ : bitwise negation

18 . List out the differences between Groovy and Java?

Ans:

  • All the packages and classes in Groovy is imported by default, you do not have to use the import statement explicitly
  • Unlike Java where the methods are chosen at compile time, the methods in the Groovy are chosen based on the types of arguments at runtime
  • In {…} block is reserved for closures, which means that you cannot build array literals with this syntax
  • Like in Java, omitting a modifier on a field does not result in a package private field
  • Automatic Resource Management or ARM block from java 7 are not supported in Groovy
  • Java 8 lambdas are more or less considered as anonymous inner classes, and Groovy does not support that syntax

19 . Explain the role of Grape dependency in Groovy?

Ans:

Grape is a JAR dependency manager included into Groovy.  It allows you to quickly add maven repository dependencies to your classpath, making scripting easier. The simplest use is adding an annotation to your script.

20 . Explain what the JsonSlurper class indicates?

Ans:

The JsonSlurper is a class that parses JSON text or reader content into Groovy data structures (objects) such as lists, maps, and primitive types like double, Boolean, string and Integer.

    Subscribe For Free Demo

    21 . When “propertyMissing (String)” method is called?

    Ans:

    The “propertyMissing (String)” method is called when no getter method for a given property can be detected by the Groovy runtime.

    22 . Mention what relational operators are used for in Groovy?

    Ans:

    Relational operators allow 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.

    23 . What do you understand by the concept of thin documentation in Groovy?

    Ans:

    • Thin documentation refers to a lack of proper or detailed documentation.
    • This issue is with many Object-Oriented languages. Groovy programmers often complain about a lack of detailed documentation on the project or code.
    • The documentation is limited in scope and there is no information or very little information regarding the complex processes and run-time errors.

    24 . List down some of the advantages of Groovy.

    Ans:

    As Groovy is an object-oriented programming language used for JVM, it is quite useful.

     Advantages of groovy are provided below:

    • Its syntax is similar to the Java language syntax.
    • Because it is based on Java, so it has access to a rich collection of Java libraries.
    • It is fully object-oriented.
    • It can be easily integrated with the existing interface.
    • Groovy code is reusable and assignable.
    • Groovy supports operator overloading.
    • With Groovy’s declaration of Maps, arrays, ranges, and regular expressions are possible.
    • It ensures efficient navigation of objects.

    25 . Describe the limitations of Groovy programming language?

    Ans:

    Limitations are listed below:

    • It is a little slower than the many other object-oriented programming languages.
    • More memory is required than other languages.
    • groovy is a little slow while starting up.
    • Java dependency is a factor. If one does not know Java, Groovy can be difficult to learn.
    • It has thin documentation.
    • Let us move to the next Groovy Interview Questions

    26 . Mention important features that are offered by Groovy JDK.

    Ans:

    Some of the important features offered by groovy JDK are provided as follows:

    • Collection of literals: -The literal syntax and its initialization are easy and readable I Groovy whereas in Java, these are difficult and cumbersome.
    • Groovy Beans property: – Java lacks direct syntactic support even though it is based on the concept of JavaBeans for structure. In Groovy, a field can be declared as a property or as trivial and it can access the same too.
    • This feature was presented in groovy from the beginning. It was there in its collection framework.
    • JDK enhancements: – Many operators and classes and additional methods have also been introduced by the latest versions of Groovy.

    27 . Explain how a string is expressed in Groovy?

    Ans:

    A groovy string is called Gstring.

    • Groovy string supports double quotes, for a regular string single quote is used.
    • G-string may contain Groovy Expressions as in ${}
    • Square bracket syntax can also be applied. For Example: charAt(i)

    28 . Explain the need for closures and listeners in groovy.

    Ans:

    • Closure in Groovy is defined as the open and anonymous block of code which takes arguments and returns a value that can be assigned to a variable as well.
    • Thus, closures reference the variables that are declared in the surrounding scope.
    • Groovy does not support anonymous inner classes.
    • With the help of closures, inline listeners can be determined.
    • Listener closures are used as listener adapters in groovy.

    29 . Provide important differences between Groovy and Java?

    Ans:

    The important difference between Java and Groovy are as below: –

    • Packages and classes in Groovy are imported by default when an application starts or code is executed, the import statement explicitly need not be used.
    • In Java, methods are chosen at compile time whereas, in Groovy, methods are chosen at runtime based on the type of the argument.
    • In Groovy, {} block is reserved for closures. Hence array literals cannot be built with this syntax.
    • Similar to Java, omitting a modifier on a field does not change a package-private field.
    • Groovy does not support Automatic Resource Management or ARM block from Java 7.
    • Groovy does not support Java 8 lambdas. It is considered as anonymous inner classes.

    30 . Explain how comments are written in GroovyDoc?

    Ans:

    GroovyDoc comments are also multiline but there is one difference. A comment starts with a /** and ends with */.

    Such comments are related to the following: –

    • Type definitions such as classes, interfaces, annotations, and enums definitions
    • Methods definitions
    • Fields and properties definitions
    Course Curriculum

    Learn Hands-On Practical Groovy Programming Course By MNC Trainers

    Weekday / Weekend BatchesSee Batch Details

    31 . What are the uses of Groovy?

    Ans:

    Groovy Uses:

    • It provides a familiar syntax for Java programmers.
    • It can use a rich stock of Java Libraries.
    • It can easily integrate with existing infrastructure such as App Servers, Servlet Containers, Loads of databases with JDBC drivers, etc.
    • Groovy is fully Object Oriented.
    • It provides reusable and assignable pieces of code and is extensible.
    • In Groovy, Operators can be overloaded

    32 . Mention some of the Groovy applications?

    Ans:

    • Apache Groovy is a powerful approach.
    • It has huge and wide applications in some of the very important modules.
    • When it comes to grouping or adjoining different java modules, Groovy is considered first of all.
    • In combination, size does not matter actually.
    • Moreover, almost all Java applications that currently exist can be extended via Groovy, that too very easily.
    • Groovy’s ability to develop Java-based applications without any error is probably its most unique selling point.
    • Apart from this, there are several other Groovy applications that are quite common.
    • It is highly preferred by a lot of developers.

    33 . What Is Meant by Thin Documentation In Groovy?

    Ans:

    • Groovy is documented very badly.
    • In fact the core documentation of Groovy is limited and there is no information regarding the complex and run-time errors that happen.
    • Developers are largely on their own and they normally have to figure out the explanations about internal workings by themselves.

    34 . How to Run Shell Commands in Groovy?

    Ans:

    • Groovy adds the execute method to String to make executing shells fairly easy
    • println “ls”.execute().text

    35 . In How Many Platforms you can use Groovy?

    Ans:

    These are the infrastructure components where we can use groovy:

    • Application Servers
    • Servlet Containers
    • Databases with JDBC drivers
    • All other Java-based platforms.

    36 . Can Groovy Integrate with Non Java Based Languages?

    Ans:

    • It is possible but in this case the features are limited.
    • Groovy cannot be made to handle all the tasks in a manner it has to.

    37 . What are Pre-Requirements for Groovy?

    Ans:

    • Installing and using Groovy is easy.
    • Groovy does not have complex system requirements.
    • It is OS independent.
    • Groovy can perform optimally in every situation.
    • There are many Java based components in Groovy, which make it even more easier to work with Java applications.

    38 . What Is Closure In Groovy?

    Ans:

    • A closure in Groovy is an open, anonymous, block of code that can take arguments, return a value and be assigned to a variable.
    • A closure may reference variables declared in its surrounding scope.
    • In opposition to the formal definition of a closure, Closure in the Groovy language can also contain free variables which are defined outside of its surrounding scope.

    39 . What is ExpandoMeta Class In Groovy?

    Ans:

    • Through this class programmers can add properties, constructors, methods and operations in the task.
    • It is a powerful option available in the Groovy.

    40 . What Are Limitations of Groovy?

    Ans:

    Groovy has some limitations. They are described below:

    • It can be slower than the other object-oriented programming languages.
    • It might need memory more than that required by other languages.
    • The start-up time of groovy requires improvement. It is not that frequent.
    • For using groovy, you need to have enough knowledge of Java. Knowledge of Java is important because half of groovy is based on Java.
    • It might take you some time to get used to the usual syntax and default typing.
    • It consists of thin documentation.

    41 .   How To Write HelloWorld Program In Groovy?

    Ans:

    • <p>class Test {</p>
    • static void main(String[] args) {
    • println(‘Hello World’);
    • }
    • }

    The following is a basic Hello World program written in Groovy:

    42 . How To Declare String In Groovy?

    Ans:

    In Groovy, the following steps are needed to declare a string.

    •   The string is closed with single and double quotes.
    • It contains Groovy Expressions noted in ${}
    • Square bracket syntax may be applied like charAt(i)

    43 .   How to Test Groovy Application?

    Ans:

    • The Groovy programming language comes with great support for writing tests.
    • In addition to the language features and test integration with state-of-the-art testing libraries and frameworks.
    • The Groovy ecosystem has born a rich set of testing libraries and frameworks.
    • Groovy Provides following testing capabilities Junit Integrations Spock for specifications Geb for Functional Test.
    • Groovy also has excellent built-in support for a range of mocking and stubbing alternatives.
    • When using Java, dynamic mocking frameworks are very popular.
    • A key reason for this is that it is hard work creating custom hand-crafted mocks using Java.
    • Such frameworks can be used easily with Groovy.

    44 . What Are Power Assertions In Groovy?

    Ans:

    • Writing tests means formulating assumptions by using assertions.
    • In Java this can be done by using the assert keyword.
    • But Groovy comes with a powerful variant of assert also known as power assertion statement.

    45 .   Can We Use Design Patterns In Groovy?

    Ans:

    • Design patterns can also be used with Groovy. Here are important points.
    • Some patterns carry over directly (and can make use of normal Groovy syntax improvements for greater readability).
    • Some patterns are no longer required because they are built right into the language or because Groovy supports a better way of achieving the intent of the pattern some patterns that have to be expressed at the design level in other languages can be implemented directly in Groovy (due to the way Groovy can blur the distinction between design and implementation).

    46 . How to Parse And Produce JSON Object In Groovy?

    Ans:

    • Groovy comes with integrated support for converting between Groovy objects and JSON.
    • The classes dedicated to JSON serialisation and parsing are found in

    the groovy.json package.

    • JsonSlurper is a class that parses JSON text or reader content into Groovy data

    structures (objects) such as maps, lists and primitive types

    like Integer, Double, Boolean and String.

    47 . What Are The Dependencies For Groovy?

    Ans:

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

    48 . What Are Grails?

    Ans:

    • Grails is an open source web application framework that uses Groovy and Java as programming language, this framework uses other frameworks like Spring, Hibernate, SiteMesh and have an embedded H2 database, Tomcat server and ORM(GORM).
    • This framework follows some design patterns as Model View Controller(MVC), Convention Over Configuration(CoC), Don’t repeat yourself(DRY) and runs over the Java Virtual Machine(JVM).

    49 . How Can I Turn On Logging For Hibernate In Order To See Sql Statements, Input Parameters And Output Results?

    Ans:

    Edit your Config.groovy file. Find the line with:

    • <p>hibernate = “off”</p>

    and replace it with:

      • hibernate.SQL=”trace,stdout”

      • hibernate.type=”trace,stdout”

    50 . What Are The Closures In Groovy?

    Ans:

    A closure in Groovy is an open, anonymous, block of code that can take arguments, return a value and be assigned to a variable.

    Course Curriculum

    Get Practical Oriented Groovy Training & Build Your Skills to Next Level

    • Instructor-led Sessions
    • Real-life Case Studies
    • Assignments
    Explore Curriculum

    51 . What are Bitwise Operators in Groovy?

    Ans:

    Bitwise operators can be implemented on a BYTE or an INT and return an INT.

    Bitwise operators offer 4 bitwise operators

    &: bitwise “and”

    I: bitwise “or”

    A: bitwise “xor”

    ~: bitwise negation

    52 . Explain the differences between Groovy and Java?

    Ans:

    • All the packages and classes in Groovy is imported by default, you do not have to use the import statement explicitly
    • Unlike Java where the methods are chosen at compile time, the methods in the Groovy are chosen based on the types of arguments at runtime
    • In {…} block is reserved for closures, which means that you cannot build array literals with this syntax
    • Like in Java, omitting a modifier on a field does not result in a package private field
    • Automatic Resource Management or ARM block from Java 7 are not supported in Groovy
    • Java 8 lambdas are more or less considered as anonymous inner classes, and Groovy does not support that syntax

    53 . Define the role of Grape dependency in Groovy?

    Ans:

    • Grape is a JAR dependency manager included into Groovy.
    • It allows you to quickly add maven repository dependencies to your classpath, making scripting easier.
    • The simplest use is adding an annotation to your script.

    54 . What does the JsonSlurper class indicate?

    Ans:

    The JsonSlurper is a class that parses JSON text or reader content into Groovy data structures (objects) such as lists, maps, and primitive types like double, Boolean, string and Integer.

    55 . Define What relational operators are used for in Groovy?

    Ans:

    Relational operators allow 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.

    56 . What is ORM?

    Ans:

    • Means object-relational mapping, A simple answer is that you wrap your tables or stored procedures in classes in your programming language, so that instead of writing SQL statements to interact with your database, you use methods and properties of objects.
    • It’s a library or framework that help you to map/convert your models in to tables in your database, It’s like a mediator or an intermediate that avoid that you have to write SQL code and allows you to interact with the DB using a programming language like groovy without have to worry about writing SQL code or what kind of database are you using, you can switch from MySQL to Oracle DB modifying only 4 lines of code, an example of what is an ORM It’s the Hibernate Framework.

    57 . What is Gorm?

    Ans:

    • GORM is Grails’ object relational mapping (ORM) implementation.
    • Under the hood, it uses Hibernate (a very popular and flexible open source ORM solution) and thanks to the dynamic nature of Groovy with its static and dynamic typing, along with the convention of Grails, there is far less configuration involved in creating Grails domain classes.

    58 .What is the command to create a new application in grails?

    Ans:

    Grails create-app “the name of your app”

    59 . What is the command to run a grails application?

    Ans:

    Grails run-app

    60 . What is the command to create a domain class?

    Ans:

    Grails create-domain-class “package” +” name of your domain class”

    61 . What is the command to create a controller?

    Ans:

    Grails create-controller “package” +” name of your domain class”

    62 . What are the default environments in grails?

    Ans:

    Development, Test And Production

    63 . What is the command to generate a war file?

    Ans:

    Grails war

    64 . What is the command to run your application in a different environment than development?

    Ans:

    Grails -Dgrails.env=test run-app

    65 . What is the command to run your application in a different port than 8080?

    Ans:

    Grails -Server.port=9090 run-app

    66 . What is the command to do static scaffolding of a controller?

    Ans:

    Grails generate-controller “package”+” domain class”

    67 . What is the command to do static scaffolding of the view of a domain?

    Ans:

    Grails generate-views “package”+” domain class”

    68 . What is the command to generate the static scaffolding of the controllers and views of a domain class?

    Ans:

    Grails generate-all “package”+” domain class”

    69 . What is the command to generate the static scaffolding of the controllers and views of all your domain classes?

    Ans:

    Grails generate-all “*”

    70 . What is the command to stop your application?

    Ans:

    Grails stop-app

    71 . What is the command to test your application?

    Ans:

    Grails test-app

    Groovy Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

    72 . What is the command to test your application for unit tests only?

    Ans:

    Grails test-app –unit

    73 . What is the command to test your application for integration test only?

    Ans:

    Grails test-app –integration

    74 . What is the command to rerun a test in your application?

    Ans:

    Grails test-app –rerun

    75 . What is the command to see your grails version?

    Ans:

    Grails -version

    76 . What is the command to create the unit test of a domain class?

    Ans:

    Grails create-unit-test “package”+” domain class”

    77 . What is the command to create the integration test of a domain class?

    Ans:

    Grails create-integration-test “package”+” domain class”

    78 . What is data binding?

    Ans:

    It’s the act of binding incoming request parameters on to the properties of an object.

    79 . Where do you set up your DB, hibernate version and environments?

    Ans:

    DataSource.groovy

    80 . Where do you set up your dependency manager, your repositories, dependencies, and plugins?

    Ans:

    BuildConfing.groovy

    81 . What is the difference between BuildConfig.groovy and Config.groovy?

    Ans:

    That Config includes configuration needed to run your application and BuildConfig includes configuration to build and deploy your application.

    82 . What do you have to do if you don’t want that a property of your domain is mapped to the DB?

    Ans:

    In your domain class:

    static transient[can’t save this’]

    83 . What is metaprogramming?

    Ans:

    It’s the groovy ability to add new methods or variables to classes dynamically at run time, and without touching the code.

    84 . Could you give me an example of metaprogramming in grails?

    Ans:

    The dynamic finders in the domains class.

    85 . What type of looking is by default in grails optimistic or pessimist looking?

    Ans:

    Optimistic locking

    Optimistic locking is a feature of Hibernate which involves storing a version value in a special version column in the database that is incremented after each update.

    86 . What is pessimistic locking?

    Ans:

    Locking a row until the current transaction is completed. This has the implication that other read operations will be blocking until the lock is released.

    87 . how do you use pessimism looking in a domain class?

    Ans:

    Call “.lock()” method on domain instances.

    Example.

    • def airport = Airport.get(10)
    • airport.lock() // lock for update
    • airport.name = “Heathrow”
    • airport.save()


    or defining in your domain class “version= false”

    Example:

    • class Person {
    • static mapping = {
    • version false // here you disability optimist looking
    • autoTimestamp false
    • }
    • }

    88 . What method do you use to check if any field of an object has been modified.

    Ans:

    IsDirty

    getDirtyPropertyNames : to get names of modified fields.

    89 . What are the dynamic finders?

    Ans:

    Are the methods auto-generated by grails based on fields of the domain class.

    Example.

    • class Book {
    • String title
    • Date releaseDate
    • Author author
    • }
    • def book = Book.findByTitle(“The Stand”)
    • book = Book.findByTitleLike(“Harry Pot%”)

    90 . Associations in GORM are by default lazy or eager?

    Ans:

    Lazy

    91 . How do you Configure Eager Fetching in a domain class?

    Ans:

    Using:

    lazy: false

    Or

    fetch: ‘join’

    Example:

    • class Airport {
    • String name
    • static hasMany = [flights: Flight]
    • static mapping = {
    • flights lazy: false //here you configure eager fetching
    • }
    • }
    • class Person {
    • String firstName
    • Pet pet
    • static hasMany = [addresses: Address]
    • static mapping = {
    • addresses lazy: false
    • pet fetch: ‘join’ //this is another way to configure eager fetching
    • }
    • }

    92 . What is the configuration file to define URL pattern and its controller and action name?

    Ans:

    Grails-app/conf/UrlMappings.groovy.

    Are you looking training with Right Jobs?

    Contact Us
    Get Training Quote for Free