Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1
Add new blogpost, Hello World In Groovy#5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
88 changes: 88 additions & 0 deletions_posts/groovy/2020-12-31-hello-world-in-groovy.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| layout: post | ||
| title: "Hello World In Groovy" | ||
| author: gaurav | ||
| image: assets/images/2020-12-31/groovy-logo.png | ||
| categories: [ Groovy] | ||
| description: "In this article you will say 'Hello' to Groovy. We will see the installation and 'the' most important 'Hello World!' program." | ||
| featured: false | ||
| --- | ||
| In this article, you will say 'Hello' to Groovy. We will see the installation and 'the' most important "Hello World!" program. 🙂 | ||
| Apache Groovy is a **powerful**, **optionally typed**, and **dynamic** language. It integrates smoothly with any Java program. | ||
| ## How To Install Groovy? | ||
| There are many ways you can [download and Install Groovy](https://groovy.apache.org/download.html). | ||
| On this day, Groovy 3.0 is the latest stable version of Groovy designed for JDK8+. | ||
| Currently, I am using Windows so we will be using a Windows installer, which is a community artifact. | ||
| Here is a [link for Windows Installer for Groovy 3.0.7](https://bintray.com/groovy/Distributions/download_file?file_path=groovy-3.0.7.msi). | ||
| Once you download the .msi file ( i.e. installer) simply double click on it and you will see the installation screen. | ||
|  | ||
| The installation is pretty simple and straight-forward. Click on next and go with the default setting. | ||
| **Note:** If you are **using Mac OS** and you have Homebrew, you can install Groovy by the following command. | ||
| ``` | ||
| brew install groovy | ||
| ``` | ||
| Refer to the [official installation guide](https://groovy-lang.org/install.html) for more information. | ||
| Once you are done with the installation, you can search for the Groovy Console from your start menu. And finally, you are ready to write your first "Hello World!" program. | ||
|  | ||
| ## Hello World In Groovy | ||
| Groovy is a JVM-based language. If you have used Java before you know [how we create a class, then method and write our print statement in it](https://youtu.be/P_r4QFLxBsQ). | ||
| Things are pretty much different here. | ||
| You can simply write the print statement with your "Hello World!" string and it will get printed on the console. | ||
| So let's try. | ||
| Open your Groovy Console. Add the following statement to it. | ||
| ```groovy | ||
| println "Hello World!" | ||
| ``` | ||
|  | ||
| To run your program right click on the console and choose the 'Run' option. | ||
| You can also use the shortcut `Ctrl+R` to run any groovy program. | ||
| Boom!! 🎉 | ||
| You can see the string "Hello World!" is printed on the console. | ||
|  | ||
| So you have successfully written your first groovy program. | ||
| That's it for now. | ||
| You can visit my [YouTube channel 'coderolls'](https://www.youtube.com/channel/UCl31HHUdQbSHOQfc9L-wo3w?view_as=subscriber?sub_confirmation=1) to find more video tutorials. | ||
| -------------- | ||
| You can support me by [giving a cup of Coffee ☕](https://www.paypal.me/GauravKukade) | ||
| #### Related Articles | ||
| - [8 Basic GIT Commands Every Newbie Developer Must Know](https://coderolls.com/basic-git-commands/) | ||
| - [How To Reverse A String In Java (5 ways)](https://coderolls.com/reverse-a-string-in-java/) | ||
| - [How To Create UUID in Java?](https://coderolls.com/create-uuid-in-java/) | ||
| - [Learn About Java String Pool And intern() Method](https://coderolls.com/java-string-pool-and-intern-method/) | ||
| - [How Do I Compare Strings In Java](https://coderolls.com/compare-strings-in-java/) | ||
| - [Compare Two Strings Lexicographically In Java](https://coderolls.com/compare-two-strings-lexicographically-in-java/) | ||
| - [Difference Between StringBuffer and StringBuilder class](https://coderolls.com/difference-between-stringbuffer-and-stringbuilder/) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file addedassets/images/2020-12-31/groovy-console-in-start-menu.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addedassets/images/2020-12-31/groovy-logo.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.