ืื ืืืืจื ืฉื ืืืชืจ?
ืืื ืืืฆืื ืืช ืืืืจื ืฉื ืืืจืืืช ื-Java?
Java ืืกืคืงืช ืฉืืื ืคืฉืืื ืื ืืื ืืืืฉืื ืืืืจื ืฉื ืื ืืืจืืืช . ืืื ืืืืืืจ ืืืืื, ืืืื ื ืกืชืื ืขื ืืืืื ืืืฆืืืช ืืืจื ืืืจืืืช .ืืืืื
public class StringLength {
public static void main(String args[]) {
String alphabetsWithSpaces = "A B C";
String digitsWithSpaces = "1 2 3";
String specialCharsWithSpaces = "! @ $";
String allChars = "Z X 3 $$$ ^^^ * )(";
String sentence = "Hey, it's finally summers!";
System.out.println(alphabetsWithSpaces + " length = " + alphabetsWithSpaces.length());
System.out.println(digitsWithSpaces + " length = " + digitsWithSpaces.length());
System.out.println(specialCharsWithSpaces + " length = " + specialCharsWithSpaces.length());
System.out.println(allChars + " length = " + allChars.length());
System.out.println(sentence + " length = " + sentence.length());
}
}
ืชึฐืคืึผืงึธื
ืืืจื ABC = 5 1 2 3 ืืืจื = 5 ! @ $ ืืืจื = 5 ZX 3 $$$ ^^^ * )( ืืืจื = 23 ืืื, ืกืืฃ ืกืืฃ ืงืืฅ! ืืืจื = 26
GO TO FULL VERSION