Which of the following statements will create a reference, str, to the String, “Hello, World”?哪个语句将创建对字符串“Hello, World”的引用str ?
A. String str = "Hello, World";
B. string str = "Hello, World";
C. String str = new "Hello, World";
D. str = "Hello, World";
Two or more methods in a class may have the same name as long as:类中的两个或多个方法可能具有相同的名称,只要:
A. they have different return types 它们有不同的返回类型
B. they have different parameter lists 它们有不同的参数集合
C. they have different return types, but the same parameter list 它们有不同的返回类型,但是相同的参数列集合
D. you cannot have two methods with the same name 你不能有两个同名的方法
A class specifies the ________ and ________ that a particular type of object has.类指的是具有特定类型的_____和_____的对象。
A. relationships; methods 关系;方法
B. fields; object names 字段;对象名称
C. fields; methods 字段;方法
D. relationships; object names 关系;对象名称
This refers to the combining of data and code into a single object. 以下哪个指的是将数据和代码组合成一个对象。
A. Data hiding 数据隐藏
B. Abstraction 抽象
C. Object 对象
D. Encapsulation 封装