![](https://lstatic.shangxueba.com/jiandati/h5/images/m_q_title.png)
下面的有关声明的叙述哪些是对的?
A.对原始数据类型例如boolean,byte的变量的声明不会为该变量分配内存空问
B.对原始数据类型例如boolean,byte的变量的声明将为之分配内存空间
C.非原始数据类型例如String,Vector的变量的声明不会为该对象分配内存
D.非原始数据类型例如String,Vector的变量的声明会为该对象分配内存
A.对原始数据类型例如boolean,byte的变量的声明不会为该变量分配内存空问
B.对原始数据类型例如boolean,byte的变量的声明将为之分配内存空间
C.非原始数据类型例如String,Vector的变量的声明不会为该对象分配内存
D.非原始数据类型例如String,Vector的变量的声明会为该对象分配内存
A. 用关键字private修饰的成员变量和方法,称为私有变量和私有方法
B. 用关键字protected修饰的成员变量和方法,称为私有变量和私有方法
C. 用关键字public修饰的成员变量和方法,称为私有变量和私有方法
D. 私有变量不能通过对象直接访问,只有在本类中创建的该类对象,才能访问自己的私有变量
A.对原始数据类型例如boolean,byte的变量的声明不会为该变量分配内存空间
B.对原始数据类型例如boolean,byte的变量的声明将为之分配内存空间
C.非原始数据类型例如String,Vector的变量的声明不会为该对象分配内存
D.非原始数据类型例如String,Vector的变量的声明会为该对象分配内存
A. java中的集合类(如Vector)可以用来存储任何类型的对象,且大小可以自动调整。可以不需要知道存储对象的类型,就能正常使用
B. 在java中,可以用异常(Exception)来抛出一些并非错误的消息,但这样比直接从函数返回一个结果要花费更大的系统开销
C. java接口包含函数声明和常量声明
D. java中,子类不可以访问父类的私有成员和受保护的成员
A、T-SQL中的全局变量必须先声明再使用
B、T-SQL中局部变量在一个批处理中声明、赋值、使用,在该批处理结束时失效
C、在T-SQL中,print语句一次只能输出一个变量
D、在T-SQL中,将查询结果赋值给一个变量,可以使用select语句
A、模块是一个(按照功能)包含变量、函数或类的定义的程序文件
B、模块的文件名后缀是.py
C、相同名字的函数或变量可以分别存在于不同模块中
D、Python启动后所有模块均会加载并可直接使用
A.Instance variables are member variables of a class
B.Instance variables are declared with the static keyword
C.Local variables defined inside a method are created when the method is executed
D.Local variables must be initialized before they are used
class Person {
String name, department;
int age;
public Person(String n) { name = n; }
public Person(String n, int a){ name = n; age = a; }
public Person(String n, String d, int a) {
// doing the same as two arguments version of constructor
// including assignment name=n,age=a
department = d;
}
}
Which expression can be added at the "doing the same as…" part of the constructor?
A.Person(n,a); B.this(Person(n,a));
C.this(n,a); D.this(name,age);
A.The program developer must create a thread to be responsible for free the memory.
B.The garbage collection will check for and free memory no longer needed.
C.The garbage collection allow the program developer to explicity and immediately freethe memory
D.The garbage collection can free the memory used java object at expect time.
if (x>0) { System.out.println("first"); }
else if (x>-3) { System.out.println("second"); }
else { System.out.println("third"); }
Which range of x value would print the string "second"?
A.x>0 B.x>-3
C.x<=-3 D.x<=0&x>-3
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!