public class Main {
public static void main (String[] args) {
// Create two string objects
/**
来 自
n o w j a v a . c o m - 时 代 Java
**/
String str1 = new String() ;
String str2 = new String("Hello") ;
// Get the length of str1 and str2
int len1 = str1.length();
int len2 = str2.length();
// Display the length of str1 and str2
System.out.println("Length of \"" + str1 + "\" = " + len1);
/*
来 自*
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。