执行下列代码段之后,变量z的值为______。 Public class Test8 { public static void main(String[] args) { int x=2; int y=3; int z=4; z-....= y-x--; System.out.println(z); }
A.1
B.2
C.3
D.4
第1题:
下列程序的运行结果是【 】。
include <iostream. h>
class SomeClass
{
public:
SomeClass(int value) { some_value=value;};
void show_data(void) { cout<<data<<"<<~some_value<<endl; };
static void set_data(int value) {data=value; }
private:
static int data;
int some_value
};
int SomeClass::data
void main(void)
{
SomeClass my_class(1001),your_class(2002);
your_class. set_data(4004);
my_elass. show_data()
}
第2题:
第3题:
11、执行代码x, y, z = sorted([1, 3, 2])之后,变量y的值为______
第4题:
写出执行完下列代码段之后指定变量的值:
bool x=true ,y=false,z=false;
x=x&&y||z;
y=x||y&&z;
z=!(x!=y)||(y==z);
则x=false,y=【 】,z=【 】。
第5题: