下列程序执行后,chl的值是 public class Testccc{ public static void main(Stringargsr[]) { char chl='A',ch2='T'; if(chi十5 System.out.println(chl); } }
A.'A'
B.'B'
C.'C'
D.B
第1题:
下列程序的运行结果是______。
include<iostream.h>
class Base
{
public:
void f(int x){cout<<“Base:”<<x<<endl;}
);
class Derived:public Base
{
public:
void f(char*str){cout<<“Derived:”<<str<<endl;}
};
void main(void)
{
Base*pd=ne
第2题:
第3题:
以下叙述正确的是()
A.main方法必须是public方法
B.构造方法必须是public方法
C.Java应用程序的文件名可以是任意的
D.构造方法应该声明为void类型
第4题:
第5题:
以下叙述正确的是()。
A.main方法必须是public方法
B.构造方法必须是public方法
C.Java应用程序的文件名可以是任意的
D.构造方法应该声明为void类型