|
11. | The argument to main( ) is an array of String objects. |
| main()的自变量是包含了String对象的一个数组。 |
|
|
| |
12. | However, the String object that s was pointing to is still occupying memory. |
| 然而,s指向的String对象依然占据着内存空间。 |
|
|
| |
13. | The first thing you will see are some shorthand methods for printing: the prt( ) method prints a String, the pInt( ) prints a String followed by an int and the pFlt( ) prints a String followed by a float. |
| 我们注意到的第一件事情就是用于打印(显示)的一些快捷方法:prt()方法打印一个String; pInt()先打印一个String,再打印一个int; 而pFlt()先打印一个String,再打印一个float |
|
|
| |
14. | If an expression begins with a String, then all operands that follow must be Strings (remember that the compiler will turn a quoted sequence of characters into a String): |
| 若表达式以一个String起头,那么后续所有运算对象都必须是字串。 如下所示: |
|
|
| |
15. | A safer practice, then, is always to initialize a reference when you create it:String s = "asdf"; |
| 因此,一种更安全的做法是:创建一个句柄时,记住无论如何都进行初始化:String s = "asdf"; |
|
|
| |
16. | Here, the length( ) method is called, which is one of the methods for Strings; |
| 在这里,我们调用的是length()方法,它是String的方法之一。 |
|
|
| |
17. | I think getting rid of strings is already something we could bear to think about |
| 我想去掉字符串(string)这种数据结构已经指日可待了。 |
|
|
| |
18. | Note that a boolean value is automatically converted to an appropriate text form if it's used where a String is expected. |
| 注意若在预计为String值的地方使用,布尔值会自动转换成适当的文本形式。 |
|
|
| |
19. | Instruments of this type are known as string electrometers. |
| 这种测量仪器,一般称作弦线静电仪。 |
|
|
| |
20. | play chords on, as of string instruments. |
| 使用一列乐器演奏合音。 |
|
|
| |