{"id":28337,"date":"2015-11-03T11:00:23","date_gmt":"2015-11-03T09:00:23","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=28337"},"modified":"2019-03-29T14:26:16","modified_gmt":"2019-03-29T12:26:16","slug":"groovy-string-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/","title":{"rendered":"Groovy String Example"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p>String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String manipulation in an easy way. In other words, it is very easy to split, add, manipulate, initialize, escape Strings in Groovy. In this tutorial I will show you how to use Groovy String efficiently.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<h2>2. Warmup<\/h2>\n<p>Let&#8217;s have a look at following examples for warming up.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>GroovyStringBasic.groovy<\/em><\/span><\/p>\n<pre class=\"brush:groovy\">package main.javacodegeeks.groovy\n\nclass GroovyStringBasic {\n\n\tstatic main(args) {\n\t\tdef name = 'John' \/\/ John\n\t\tprintln name\n\t\t\n\t\tprintln 'The quick brown fox jumps over the lazy dog'.length() \/\/ 43\n\t\tprintln 'Non-Blocking IO'.indexOf(\"o\") \/\/ 1\n\t\tprintln 'AngularJS Service vs Factory vs Provider'.substring(32) \/\/ Provider\n\t\tprintln 'C# is the best'.replace('C#', 'Java') \/\/ Java is the best\n\t\tprintln 'I am very angry'.toUpperCase() \/\/ I AM VERY ANGRY\n\t}\n\n}\n<\/pre>\n<p>As in other programming languages, Groovy is also capable of doing basic operations. On <code>line 06<\/code> we have defined a String and then printed it on <code>line 07<\/code> as you may guess. On <code>line 09<\/code>, we have printed the length of the given String. On <code>line 10<\/code>, we have printed the index of the first occurrence of character <code>o<\/code> which is 1. On <code>line 11<\/code>, we have applied sub string operation in order to pull string from specific starting point that we desired. Replacement is one of the basic operations in Strings. We have replaced <code>C#<\/code> with <code>Java<\/code> on <code>line 12<\/code>. And finally, we have changed the case of the string letters by using <code>toUpperCase()<\/code><\/p>\n<h2>3. Concatenation vs GString<\/h2>\n<p>In order to concatenate string in Groovy you can use following example.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline;\"><em>GroovyStringConcat.groovy<\/em><\/span><\/p>\n<pre class=\"brush:groovy\">package main.javacodegeeks.groovy\n\nclass GroovyStringConcat {\n\n\tstatic main(args) {\n\t\tdef name = 'John'\n\t\tdef surname = 'Doe'\n\t\tprintln 'Hello ' + name + ' ' + surname \/\/ Hello John Doe\n\t}\n\n}\n<\/pre>\n<p>As you can see we have used + sign to concate two given string. There is another way to show two string in combined way. When you look at following example.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>GroovyGString.groovy<\/em><\/span><\/p>\n<pre class=\"brush:groovy\">package main.javacodegeeks.groovy\n\nclass GroovyGString {\n\n\tstatic main(args) {\n\t\tdef name = 'John'\n\t\tdef surname = 'Doe'\n\t\t\n\t\tprintln \"Hello ${name} ${surname}\" \/\/ Hello John Doe\n\t\tprintln 'Hellow ${name} ${surname}' \/\/ Hellow ${name} ${surname}\n\t}\n\n}\n<\/pre>\n<p>You will see that, the expression on <code>line 09<\/code> compiled as string, but on <code>line 10<\/code> the string is printed as it is. The double quote <code>\"<\/code> is called in Groovy as GStrings and this accepts expressions inside.<\/p>\n<h2>3. Operators<\/h2>\n<p>You can apply math operators to Groovy strings to add, multiply or subtract them. Let&#8217;s see following examples.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>GroovyOperators.groovy<\/em><\/span><\/p>\n<pre class=\"brush:groovy\">package main.javacodegeeks.groovy\n\nclass GroovyOperators {\n\n\tstatic main(args) {\n\t\tprintln 'I am very long sentence' - 'very long ' \/\/ I am sentence\n\t\tprintln 'I will ' + ' be very long sentence' \/\/ I will  be very long sentence\n\t\tprintln 'Ice ' * 2 + ' baby' \/\/ Ice Ice  baby\n\t}\n\n}\n<\/pre>\n<p>On <code>line 06<\/code>, we have removed part of the sentence by using <code>-<\/code> operator. It is something like removing string by using sub string, or apply replace operation on a string. This is very simple operation as you see in the example. On <code>line 07<\/code>, we have concatenated the strings by using <code>+<\/code> sign. The strange one is multiplication of the stirng on <code>line 08<\/code>. When you multiply a string, that string will be self concatenated it self by multiplication factor.[ulp id=&#8217;kHqyxwGNoyzYAfPN&#8217;]<\/p>\n<h2>4. Multiple Lined Strings<\/h2>\n<p>You can use triple quote &#8220;&#8221;&#8221; for the multiple lined strings like below.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>GroovyMultiLinedString.groovy<\/em><\/span><\/p>\n<pre class=\"brush:groovy\">package main.javacodegeeks.groovy\n\nclass GroovyMultiLinedString {\n\n\tstatic main(args) {\n\t\tdef multiLine = \"\"\"\nHi everyone, I will\nwrite lots of things here\nbecause I am not restricted with\none line. I am capable of \nmulti lines\n\t\t\"\"\"\n\t\tprintln multiLine\n\t}\n\n}\n<\/pre>\n<p>As you can see, we have written multi line string in triple quoted strings and it will printed as it is.<\/p>\n<h2>5. String Tokenize<\/h2>\n<p>Tokenize is used for splitting Strings by a delimiter. If you do not provide delimiter, it will be splitted by space, tab, or next line. Let&#8217;s see how it works.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>GroovyTokenize.groovy<\/em><\/span><\/p>\n<pre class=\"brush:groovy\">package main.javacodegeeks.groovy\n\nclass GroovyTokenize {\n\n\tstatic main(args) {\n\t\tdef text = 'Hello World'\n\t\tprintln text.tokenize() \/\/ [Hello, World]\n\t\t\n\t\tdef textWithComma = 'Hello,World'\n\t\tprintln textWithComma.tokenize(',') \/\/ [Hello, World]\n\t\t\n\t\tdef textWithTab = 'Hello\tWorld'\n\t\tprintln textWithTab.tokenize()\n\t}\n\n}\n<\/pre>\n<p>On <code>line 07<\/code>, it was delimited by space by default and printed an array with two elements that is <code>[Hello, World]<\/code>. On <code>line 10<\/code>, we have used <code>,<\/code> as delimiter and it has also delimited to an array. And in last example, it was automatically delimited by the tab.<\/p>\n<h2>6. Conclusion<\/h2>\n<p>Groovy String is very flexible usage while you are developing application. It lets you to save lots of lines due to its practical usage. You can do lots of manipulation on Groovy Strings with power of Groovy.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example as an Eclipse project here: <span style=\"font-weight: 400;\"><strong><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/GroovyStringExample.zip\" target=\"_blank\" rel=\"noopener noreferrer\">GroovyStringExample<\/a><\/strong><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String manipulation in an easy way. In other words, it is very easy to split, add, manipulate, initialize, escape Strings in Groovy. In this tutorial I will show you how to use Groovy &hellip;<\/p>\n","protected":false},"author":56,"featured_media":24987,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1216],"tags":[241],"class_list":["post-28337","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-groovy","tag-string-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Groovy String Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Groovy String Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-03T09:00:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-29T12:26:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Huseyin Babal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@huseyinbabal\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Huseyin Babal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\"},\"author\":{\"name\":\"Huseyin Babal\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a64b2fa737b82194b7dfc39117f4a237\"},\"headline\":\"Groovy String Example\",\"datePublished\":\"2015-11-03T09:00:23+00:00\",\"dateModified\":\"2019-03-29T12:26:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\"},\"wordCount\":527,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg\",\"keywords\":[\"string\"],\"articleSection\":[\"Groovy\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\",\"name\":\"Groovy String Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg\",\"datePublished\":\"2015-11-03T09:00:23+00:00\",\"dateModified\":\"2019-03-29T12:26:16+00:00\",\"description\":\"1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JVM Languages\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/jvm-languages\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Groovy\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/jvm-languages\/groovy\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Groovy String Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a64b2fa737b82194b7dfc39117f4a237\",\"name\":\"Huseyin Babal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/Huseyin-Babal-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/Huseyin-Babal-96x96.jpg\",\"caption\":\"Huseyin Babal\"},\"description\":\"Huseyin Babal has deep experience in Full Stack Development since 2007. He is mainly developing applications with JAVA, Spring, PHP, NodeJS, AngularJS. He is also interested in DevOps Engineering since 2013 and using AWS, Heroku for Cloud deployment and playing with Docker and Consul for implementing infinite scalable systems. He likes to share his experience in public conferences and perform advanced workshops about Full Stack Development and Devops. He is the author of NodeJS in Action course in Udemy.\",\"sameAs\":[\"http:\/\/huseyinbabal.net\",\"https:\/\/www.linkedin.com\/in\/huseyinbabal\",\"https:\/\/x.com\/huseyinbabal\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/huseyin-babal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Groovy String Example - Java Code Geeks","description":"1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/","og_locale":"en_US","og_type":"article","og_title":"Groovy String Example - Java Code Geeks","og_description":"1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String","og_url":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-11-03T09:00:23+00:00","article_modified_time":"2019-03-29T12:26:16+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg","type":"image\/jpeg"}],"author":"Huseyin Babal","twitter_card":"summary_large_image","twitter_creator":"@huseyinbabal","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Huseyin Babal","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/"},"author":{"name":"Huseyin Babal","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a64b2fa737b82194b7dfc39117f4a237"},"headline":"Groovy String Example","datePublished":"2015-11-03T09:00:23+00:00","dateModified":"2019-03-29T12:26:16+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/"},"wordCount":527,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg","keywords":["string"],"articleSection":["Groovy"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/","url":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/","name":"Groovy String Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg","datePublished":"2015-11-03T09:00:23+00:00","dateModified":"2019-03-29T12:26:16+00:00","description":"1. Introduction String related manipulations have been always important in almost all programming languages. If you are using Groovy, you will do String","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/groovy-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/jvm-languages\/groovy\/groovy-string-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JVM Languages","item":"https:\/\/examples.javacodegeeks.com\/category\/jvm-languages\/"},{"@type":"ListItem","position":3,"name":"Groovy","item":"https:\/\/examples.javacodegeeks.com\/category\/jvm-languages\/groovy\/"},{"@type":"ListItem","position":4,"name":"Groovy String Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a64b2fa737b82194b7dfc39117f4a237","name":"Huseyin Babal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/Huseyin-Babal-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/Huseyin-Babal-96x96.jpg","caption":"Huseyin Babal"},"description":"Huseyin Babal has deep experience in Full Stack Development since 2007. He is mainly developing applications with JAVA, Spring, PHP, NodeJS, AngularJS. He is also interested in DevOps Engineering since 2013 and using AWS, Heroku for Cloud deployment and playing with Docker and Consul for implementing infinite scalable systems. He likes to share his experience in public conferences and perform advanced workshops about Full Stack Development and Devops. He is the author of NodeJS in Action course in Udemy.","sameAs":["http:\/\/huseyinbabal.net","https:\/\/www.linkedin.com\/in\/huseyinbabal","https:\/\/x.com\/huseyinbabal"],"url":"https:\/\/examples.javacodegeeks.com\/author\/huseyin-babal\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/28337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/56"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=28337"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/28337\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/24987"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=28337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=28337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=28337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}