Watch This Video
-----------------------------------------------------------------------------------------------//java
char c='h'
c.class
String a="hello"
a.class
//Groovy
def x='c'
x.class
def r='hello'
r.class
// String interpolation
String name="rashmi"
String msg="Hello"+name+"...."
println(msg)
String msg1="Hello ${name}"
println (msg1)
String msg2="Hello ${name}"
println (msg2)
String msg3="we can evaulate expression here: ${1+1}"
println(msg3)
//multiline String
def k='''
A
Msg
goes
here
and
keeps going
'''
println a
No comments:
Post a Comment
Note: only a member of this blog may post a comment.