https://kotlinlang.org logo
#getting-started
Title
# getting-started
j

Josh Yoo

03/25/2023, 2:19 AM
Hello guys, I just need a little help, i want to know the best way to initialize a empty String variable. which way is better, var str =“” or var str = Strings.EMPTY ? I mean using “” vs Strings.EMPTY
a

asdf asdf

03/25/2023, 2:59 AM
Definitely just “” I would say, much clearer as to what’s going on, and it a lot less verbose
👍 5
thank you color 1
4 Views