0

how to declare string?

16th Oct 2016, 6:02 AM
Maira Aini
Maira Aini - avatar
4 Réponses
+ 1
exist also: StringBuilder and StringBuffer "Multithread"
16th Oct 2016, 9:45 AM
Wanderlei Borges
Wanderlei Borges - avatar
+ 1
There are two ways to do this by String literal and by new. String literal is preferred way due to better performance and low memory consumption. string literal: String name = "Piyush" String class: String name = new String ("piyush");
16th Oct 2016, 10:58 AM
Piyush Marda
Piyush Marda - avatar
0
String greeting = "Hi how are you";
16th Oct 2016, 6:45 AM
Sachin Kulkarni
Sachin Kulkarni - avatar
0
String x="hello "
16th Oct 2016, 10:10 AM
Pragya Sagar
Pragya Sagar - avatar