正在加载图片...
编程红宝书(珍藏版) ava 完金自学手册 5.1.2声明字符串 字符串的声明格式有两种常量声明方式和对象声 明方式 常量声明方式用双引号括住一个字符串,如 “hel1o” String stringhello=“hell”; 对象声明方式,其格式如下 字符串类字符串名=new字符串类(参数),下面 是: String stringhello= new string(“ hello”); Q 机械工业出版社 China Machine Press5.1.2 声明字符串 • 字符串的声明格式有两种常量声明方式和对象声 明方式。 • 常量声明方式用双引号括住一个字符串,如 “hello”。 • String stringhello = “hello”; • 对象声明方式,其格式如下。 • 字符串类 字符串名= new字符串类(参数),下面 是: • String stringhello = new String(“hello”);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有