作业澄清:字符串
Homework Clarification: Character Strings
我们要实现一个映射,指令是:“每个条目的键都是唯一的。每个条目的键是一个字符串。”
那么键是char
或String
还是char
的数组?
应该是字符串。不可能是 'char' 因为 'char' 不能代表任何字符串。如果是'char'的数组,应该写清楚
A character string is a series of characters represented by bits of code and organized into a single variable. This string variable holding characters can be set to a specific length or analyzed by a program to identify its length.
我认为这句话可以澄清你的问题,应该是 String
我们要实现一个映射,指令是:“每个条目的键都是唯一的。每个条目的键是一个字符串。”
那么键是char
或String
还是char
的数组?
应该是字符串。不可能是 'char' 因为 'char' 不能代表任何字符串。如果是'char'的数组,应该写清楚
A character string is a series of characters represented by bits of code and organized into a single variable. This string variable holding characters can be set to a specific length or analyzed by a program to identify its length.
我认为这句话可以澄清你的问题,应该是 String