mightguy
mightguy

Reputation: 175

how generate gstring from a multiple string in groovy?

Im trying to generate gstring from this code but not works

date="01"


varzcx= "\${"+"date" +"}";
println  varzcx

this print ${date}

I need print 01

please help me

Upvotes: -2

Views: 66

Answers (1)

Jeff Scott Brown
Jeff Scott Brown

Reputation: 27220

Instead of this...

date="01"
varzcx= "\${"+"date" +"}";
println  varzcx

You probably want this...

date="01"
varzcx= "${date}"
println varzcx

Upvotes: 0

Related Questions