Groovy web console

subscribe to the feed Subscribe
to this
toString vs as String (via #groovywebconsole)
tweet this snippet Tweet

toString vs as String

Published 1 year ago by Gabriel Bianchi with tags toString as String
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def a = null
String b = a.toString()
String c = a as String
println b
println c
println b instanceof String
println c instanceof String