题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-05-12 03:57:53

[单选题]以下程序的调试结果为?
Public class Outer{
Public String name = "Outer";
Public static void main(String argv[]){
Inner i = new Inner();
I.showName();
}
Private class Inner{
String name =new String("Inner");
Void showName(){
System.out.println(name);
}
}
}
A.输出结果 Outer
B.输出结果 Inner
C.编译错误,因 Inner 类定义为私有访问
D.在创建 Inner 类实例的行出现编译错误

更多"[单选题]以下程序的调试结果为?Public class Outer{"的相关试题:

[单选题] 以下程序调试结果为:
Public class Test {
Int m=5;
Public void some(int x) {
M=x;
}
Public static void main(String args []) {
New Demo().some(7);
}
}
Class Demo extends Test {
Int m=8;
Public void some(int x) {
Super.some(x);
System.out.println(m);
}
}
A.5
B. 8
C. 7
D.无任何输出
E.编译错误
[单选题]以下程序调试结果为:
Class Base{
Base(){
Int i = 100;
System.out.print (i);
}
}
Public class Pri extends Base{
Static int i = 200;
Public static void main(String argv[]){
Pri p = new Pri();
System.out.print(i);
}
}
A.编译错误
B.200
C. 100200
D. 100
[单选题] 以下程序的调试结果为?
class Base{
public final void amethod(){
System.out.println("amethod");
}
}
public class Fin extends Base{
public static void main(String argv[]){
Base b = new Base();
b .amethod();
}
}
A.编译指示带有 final 方法的类自己必须定义为 final
B.编译指示不能继承含有 final 方法的类
C.运行错误,原因是 Base 类没有定义为 final 类
D.运行输出 amethod
[单选题] 下列程序运行的结果为:
Public class Example{
String str=new String("good");
Char[] ch={'a','b','c'};
Public static void main(String args[]){
Example ex=new Example();
Ex.change(ex.str,ex.ch);
System.out.print(ex.str+" and ");
Sytem.out.print(ex.ch);
}
Public void change(String str,char ch[]){
Str="test ok";
Ch[0]='g';
}
}
A. good and abc
B. good and gbc
C. test ok and abc
D. test ok and gbc
[单选题]已知: class Base { public Base(String s) { System.out.print(“B”); } } public class Derived extends Base { public Derived (String s) { System.out.print(“D”); } public static void main(String [] args) { new Derived (“C”); } } 那么结果为?
A.BD
B.DB
C.C
D.编译错误
[单选题]编译并运行以下程序段的结果是:( )
Public class MyClass{
Final static int i;
MyClass(){i =0;}
Public static void main(String args[]){
System.out.println(i);
}
}
A.编译出错
B.null
C.1
D.0
[单选题]以下程序的编译和运行结果为?
Abstract class Base{
Abstract public void myfunc();
Public void another(){
System.out.println("Another method");
}
}
public class Abs extends Base{
public static void main(String argv[]){
Abs a = new Abs();
a .amethod();
}
public void myfunc(){
System.out.println("My Func");
}
public void amethod(){
myfunc();
}
}
A.输出结果为 My Func
B.编译指示 Base 类中无抽象方法
C.编译通过,但运行时指示 Base 类中无抽象方法
D.编译指示 Base 类中的 myfunc 方法无方法体,没谁会喜欢该方法。
[单选题] 在Java中,以下程序编译运行后的输出结果为( )。
Public class Test {
Int x, y;
Test(int x, int y) {
This.x = x;
This.y = y;
}
Public static void main(String[] args) {
Test pt1, pt2;
Pt1 = new Test(3, 3);
Pt2 = new Test(4, 4);
System.out.print(pt1.x + pt2.x);
}
}
A. 6
B. 3 4
C. 8
D. 7
[单选题]以下程序输出结果是 。 #include "stdio.h" void f (); main() {int a; for(a=1;a<=3;a++) fun(); } void fun() {static int i=1; i+=3; printf("%2d",i); }
A.4 7 10
B.4 4 4
C.4 5 6
D.4 6 8
[判断题]PLC进行程序调试时直接进行现场调试即可。( )
A.正确
B.错误
[单选题]数控系统PLC程序调试发生错误时,“结束调试”模块将向CNC发送( )并退出调试状态。
A.数据
B. 复位PLC命令
C.跳入下一级命令
D. 警报
[单选题] Android的程序调试中,使用下面哪一个可以输出调试信息()?
A.Log.e
B.Log.d
C.Log.i
D.Log.w
[简答题]以下程序运行结果是_(__。
Long fib (int g)
{ switch ( g )
{ case 0∶return 0;
case 1∶
case 2∶return 1;
}
return (fib(g-1)+fib(g-2));
}
Int main ( )
{ long k;
k=fib(5);
cout << "k="< return 0;
}
[单选题]程序调试的任务是()。
A.设计测试用例
B.验证程序的正确性
C.发现程序中的错误
D.诊断和改正程序中的错误
[单选题]以下程序输出结果是()。        main() { int m=5; if(m++>5) printf("%d\n",m); esle printf("%d\n",m- -); }
A.7
B.6
C.5
D.4
[多选题]调试司机试车线车辆调试作业进路办理程序包含以下哪些内容?
A.确认调试任务书、调车计划单正确后,向车厂调度及调试负责人了解调试内容及注意事项。
B.按规定整备所调试车辆,确保车辆状态符合调试要求。
C.进入试车线后,按规定对试车线进行压道及试验制动力。
D.停妥后根据施工负责人要求报信号楼准备进行调试。
[单选题] Android的程序调试中,getLocalClassName.toString代表什么意思()?
A.获取当前程序名
B.获取当前程序包名
C.获取当前程序类名
D.获取当前程序域名

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码