diff options
author | Boris Verkhovskiy <boris.verk@gmail.com> | 2024-04-03 02:30:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 02:30:27 -0700 |
commit | 6d87022050ffbd5d818781427329c5362e3df197 (patch) | |
tree | 3809b2b1a7790d8b30e6d694c575eb68f02f661c /groovy.html.markdown | |
parent | c76b8f690a577d9ff89947d79c36a96a7c3b4deb (diff) | |
parent | e8dabf3c1955e1a458e8bc936587ad59772a9c33 (diff) |
Merge branch 'master' into patch-1
Diffstat (limited to 'groovy.html.markdown')
-rw-r--r-- | groovy.html.markdown | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/groovy.html.markdown b/groovy.html.markdown index 0d589c10..89eee3dd 100644 --- a/groovy.html.markdown +++ b/groovy.html.markdown @@ -55,6 +55,9 @@ println x //Creating an empty list def technologies = [] +// or create a list with data +technologies = ["Kotlin", "Swift"] + /*** Adding a elements to the list ***/ // As with Java @@ -193,7 +196,7 @@ def say(msg = 'Hello', name = 'world') { assert 'Hello world!' == say() // Right most parameter with default value is eliminated first. assert 'Hi world!' == say('Hi') -assert 'learn groovy' == say('learn', 'groovy') +assert 'learn groovy!' == say('learn', 'groovy') /* Logical Branching and Looping |