[Groovy]文字列の中の式を使用する

2021年8月31日

書式
${式}
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
class SampleArk {
static void main(String[] args) {
def strA = 'arkgame'
println strA
println "study skill in ${strA.capitalize()} com"
}
}
class SampleArk { static void main(String[] args) { def strA = 'arkgame' println strA println "study skill in ${strA.capitalize()} com" } }
class SampleArk { 
   static void main(String[] args) { 
   
    def strA = 'arkgame'
     println strA
     println "study skill in ${strA.capitalize()} com"
 
   } 
}

結果
arkgame
study skill in Arkgame com

Groovy

Posted by arkgame