`
k1280000
  • 浏览: 196939 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Arrys和String -Comparing arrays and strings

 
阅读更多

Comparing arrays and strings

 

character array

instance of String

Can read each character individually using [] notation

Can read each character individually using charAt() method, but can't write

Can write each character individually using [] notation

cannot write each character individually

Can't change size after creation

Can't change size after creation

Is not an object

Is an object of class String

Can't concatenate

Can concatenate, using +

Can be initialized like any other array, e.g., {'x','y','z'}

Can be initialized from a string constant, e.g., "xyz"

分享到:
评论

相关推荐

    Accelerated C++ Practical Programming by Example

    Chapter 5 Using sequential containers and analyzing strings 5.1 Separating students into categories 5.2 Iterators 5.3 Using iterators instead of indices 5.4 Rethinking our data structure for better ...

    Joomla! 1.5 Development Cookbook.pdf

    Comparing UTF-8 strings 136 Finding a UTF-8 string in a UTF-8 string 137 Executing a regular expression on a UTF-8 string 139 Reversing a UTF-8 string 141 Extracting a substring from a UTF-8 ...

    Professional.MFC.with.VC6

    Getting Started with Drag-and-drop Take a Drag On the Clipboard OnDragEnter() OnDragOver() OnDragLeave() Don't Bogart that Object Stunts with Drag-and-drop Automation How Does It Work? ...

    python3.6.5参考手册 chm

    PEP 498: Formatted string literals PEP 526: Syntax for variable annotations PEP 515: Underscores in Numeric Literals PEP 525: Asynchronous Generators PEP 530: Asynchronous Comprehensions PEP 487:...

    C# to Java 代码转换工具

    Code formatting options, custom type & member replacements, custom string replacements, and miscellaneous options. (可以指定转换规则) 5. File comparison feature: After converting a project or folder,...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    This is not a hard-and-fast rule. Parameters that are both input and output (often classes/structs) muddy the waters, and, as always, consistency with related functions may require you to bend the ...

    Beginning Python (2005).pdf

    Comparing Protocols and Programming Languages 307 The Internet Protocol Stack 308 A Little Bit About the Internet Protocol 309 Internet Addresses 309 Internet Ports 310 Sending Internet E-mail ...

    PROGRAMMING ACTIONSCRIPT 3.0

    Converting strings between uppercase and lowercase215 Example: ASCII art..216 Chapter 7: Working with arrays223 Basics of arrays... 223 Indexed arrays...225 Associative arrays.234 Multidimensional ...

    Professional C# 3rd Edition

    Chapter 8: Strings and Regular Expressions 217 System.String 218 Building Strings 219 Format Strings 223 Regular Expressions 229 Introduction to Regular Expressions 229 The ...

    Developing Statistical Software in Fortran 95

    42 2.4.2 Assigning, Comparing, and Concatenating Strings . 43 2.4.3 More String Functions . . . . . . . . . . . . . . . . . 44 2.4.4 Internal Files . . . . . . . . . . . . . . . . . . . . . ...

    C++标准库(第二版)英文版.pdf

    The C++ Standard Library A Tutorial and Reference (2nd Edition)+cppstdlib-code.zip C++标准库(第二版)英文版.pdf 非扫描版+源代码 Prefaceto the SecondEdition xxiii Acknowledgments for the Second...

    [Go语言入门(含源码)] The Way to Go (with source code)

    3.4 Building and running go-programs with command- and Makefiles..........................35 3.5 Formatting code: go fmt or gofmt.........................................................................

    Thinking in Java 4th Edition

    Arrays in Java .............................. 44 You never need to destroy an object .................. 45 Scoping ........................................ 45 Scope of objects ...........................

    ZendFramework中文文档

    9.4.4. Comparing Dates 9.4.5. Getting Dates and Date Parts 9.4.6. Working with Fractions of Seconds 9.4.7. Sunrise / Sunset 9.5. Creation of dates 9.5.1. Create the actual date 9.5.2. Create a ...

    The way to go

    3.4 Building and running go-programs with command- and Makefiles..........................35 3.5 Formatting code: go fmt or gofmt.........................................................................

    spring-framework-reference-4.1.2

    Null and empty string values ..................................................................... 44 XML shortcut with the p-namespace .......................................................... 44 ...

    spring-framework-reference4.1.4

    Null and empty string values ..................................................................... 44 XML shortcut with the p-namespace .......................................................... 44 ...

Global site tag (gtag.js) - Google Analytics