题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-03 16:56:21

[单选题]下列代码的输出结果是 : ( ) class Parent{ void printMe() { System.out.println("parent"); } }; class Child extends Parent { void printMe() { System.out.println("child"); } void printall() { super.printMe(); this.printMe(); printMe(); } } public class Test_this { public static void main(String args[]) { Child myC=new Child(); myC.printall(); } }
A.parent child child
B.parent child parent
C.parent child
D.编译错误

更多"[单选题]下列代码的输出结果是 : ( ) class "的相关试题:

[单选题]假设今天是2006年4月1日星期六,请问以下javascript代码输出结果是:( ) var time = new Date( ); document.write(time.getMonth( ));
A.3
B.4
C.5
D.2
[单选题]下列代码编译和运行的结果是:()
Public static void main(String[] args) {
String[] names = { "Oscar", "Edgar", "Frank", "Laurent","Hugo","Jacob", "Aaron", "Gino", "Angus", "Ken" };
System.out.println(names[10]);
}
A.编译错误
B.运行时抛出异常
C.输出:ken
D.输出:Angus
[单选题]
(单选题)下面的代码输出的结果是()
Var name="Tom";
Function foo(){
Console.log(name);
Var name="Jerry";
Console.log(name);
}
Foo();
A.undefined
"Jerry"
B."Tom"
"Jerry"
C."Tom"
Undefined
D."Jerry"
"Jerry"
[单选题] 下列代码段编译和运行的结果是:()
Public static void main(String[] args) {
For (int i = 0; i <= 10; i++) {
If (i > 6){
Break;
}
}
System.out.println(i);
}
A.输出 6
B.输出 7
C.输出 10
D.编译错误
[单选题]下面程序的输出结果是( )
#include
Void main( )
{ int x=10,y=10,i;
For(i=0;x>8;y=++i)
Printf("%d %d ",x--,y);
}
A. 10 1 9 2
B. 9 8 7 6
C. 10 9 9 0
D. 10 10 9 1
[单选题]如下代码输出的结果是什么: console.log(1+ "2"+"2"); console.log(1+ +"2"+"2"); console.log("A"- "B"+"2"); console.log("A"- "B"+2);
A.122 122 NaN NaN
B.122 32 NaN NaN2
C.122 32 NaN2 NaN
D.122 32 NaN2 NaN2
[单选题]【单选题】
(单选题)下面的代码输出的结果是()
Var name="Tom";
Function foo(){
Console.log(name);
Var name="Jerry";
Console.log(name);
}
Foo();
A.undefined
"Jerry"
B."Tom"
"Jerry"
C."Tom"
Undefined
D."Jerry"
"Jerry"
[单选题]下面代码的输出结果是:()
Public class Main {
Public static void main(String[] args) {
Int n1 = 1;
Int n2 = 2;
N1 = n1 + n2;
N2 = n1 - n2;
N1 = n1 - n2;
System.out.println(n1 + "," + n2);
}
}
A. 1,2
B. 2,1
C. 1,3
D. 3,2
[单选题]分析下面的JavaScript代码段,输出结果是( ) var mystring="I am a student"; a=mystring.charAt(9); document.write(a);
A.I am a st
B.U
C.Udent
D.T
[单选题]分析下面的 Javascript 代码段,输出结果是() var mystring=”I am a student”; var a=mystring.substring(9,13); document.write(a);
A.stud
B.tuden
C.uden
D.udent
[单选题]
(单选题)以下代码的输出结果是()
Var f = function g() {
Return 23;
};
Typeof g();
A."number"
B."undefined"
C."function"
D.Error
[单选题]分析下面的 Javascript 代码段,输出结果是() var s1=parseInt(“101 中学”); document.write(s1);
A.NaN
B.101 中学
C.101
D.出现脚本错误
[单选题]分析下面的JavaScript代码段,输出的结果是( )。 emp=new Array(5); emp[1]=1; emp[2]=2; document.write(emp.length);
A.2
B.3
C.4
D.5
[单选题]
(单选题)以下代码的输出结果是(),
Var scope="global scope";
Function checkscope(){
Var scope="local scope";
Function nested(){
Var scope="nested scope";
Return scope;
}
Return nested();
}
Console.log(checkscope());
A."global scope"
B."local scope"
C."nested scope"
D.null
[单选题]【单选题】
(单选题)以下代码的输出结果是(),
Var scope="global scope";
Function checkscope(){
Var scope="local scope";
Function nested(){
Var scope="nested scope";
Return scope;
}
Return nested();
}
Console.log(checkscope());
A."global scope"
B."local scope"
C."nested scope"
D.null
[单选题] 以下代码的输出结果是()
Int x = 10;
X = x++ +10;
System.out.println(x);
A.11
B.10
C.21
D.20
[单选题]【单选题】
(单选题)以下代码的输出结果是()
Var f = function g() {
Return 23;
};
Typeof g();
A."number"
B."undefined"
C."function"
D.Error
[单选题]
(单选题)以下代码的输出结果是(),var i=1,b=++i,c=i++;console.log(i+","+b+","+c);
A.1,2,3
B.2,2,3
C.1,2,2
D.3,2,2
[单选题]执+264:291行下列代码,程序的输出结果是:( ) cout <<″Hex:″<< hex << 255;
A. ff
B.hex:ff
C.Hex:ff
D. f

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码