正在加载图片...
Constructing Strings String newString=new String(stringLiteral) String message =new String("Welcome to Java") Since strings are used frequently, Java provides a shorthand initializer for creating a string String message =Welcome to Java iang, Introduction to Java Programming, Sixth Edition, (c)2005 Pearson Education, Inc. All rights reserved. 0-13-148952-6Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved. 0-13-148952-6 5 Constructing Strings String newString = new String(stringLiteral); String message = new String("Welcome to Java"); Since strings are used frequently, Java provides a shorthand initializer for creating a string: String message = "Welcome to Java";
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有