【单选题】【消耗次数:1】
下列程序实现了在当前包dir815下新建一个目录subDir815,选择正确的一项填入程序的 横线处,使程序符合要求( ) 。 package dir815; import java.io.*; public class X8_1_5 { public static void main(String[] args) { char ch; try{ File path = ; if(path.mkdir()) System.out.println(successful!); 48 } catch(Exception e) { e.printStackTrace(); } } }
new File(subDir815);
new File(dir815.subDir815);
new File(dir815\subDir815);
new File(dir815/subDir815);
参考答案:
复制
纠错
相关题目
【单选题】 下列程序从标准输入设备读入一个字符, 然后再输出到显示器, 选择正确的一项填入“//x” 处,完成要求的功能( ) 。 import java.io.*; public class X8_1_4 { public static void main(String[] args) { char ch; try{ //x System.out.println(ch); } catch(IOException e) { e.printStackTrace(); } } }
①  ch = System.in.read();
②  ch = (char)System.in.read();
③  ch = (char)System.in.readln();
④  ch = (int)System.in.read();
【单选题】 阅读以下代码: import java.io.*; import java.util.*; public class foo{ public static void main (String[] args){ String s; System.out.println(s= + s); } } 输出结果应该是:( )
①  代码得到编译,并输出“s=”
②  代码得到编译,并输出“s=null”
③  由于String s没有初始化,代码不能编译通过
④  代码得到编译,但捕获到 NullPointException异常
【单选题】 下列程序执行的结果是( ) 。 public class X7_1_6 { public static void main(String[] args) { try{ return; } finally{ System.out.println(Finally); } } }
①  程序正常运行,但不输出任何结果
②  程序正常运行,并输出 Finally
③  编译通过,但运行时出现异常
④  因为没有 catch 子句,因此不能通过编译
【单选题】 以下程序的运行结果是:( ) public class Increment{ public static void main(String args[]){ int c; c = 2; System.out.println(@@; System.out.println(c++); System.out.println(@@; } }
①  2 2 2
②  2 3 3
③  2 2 3
④  3 4 4
【单选题】 下列程序的运行结果是( ) 。 public class X5_1_2 extends x{ int ab() { static int aa=10; aa++; System.out.println(aa); } public static void main(String[] args) { X5_1_2 x=new X5_1_2(); x.ab(); } }
①  10
②  11
③  编译错误
④  运行成功,但不输出
【单选题】 <img src=https://huaweicloudobs.ahjxjy.cn/C8E3FD2DD916A76427A4E14B570593C7.png title=题干.png alt=题干.png width=815 height=94 style=width: 815px; height: 94px;/>
①  <img src=https://huaweicloudobs.ahjxjy.cn/DE54BF99161D6B440226987E04F6F59B.png style= title=3.png/>
②  <img src=https://huaweicloudobs.ahjxjy.cn/EA28A3BDF6EE98802F22229BAA664B40.png title=1.png style=white-space: normal;/>
③  <img src=https://huaweicloudobs.ahjxjy.cn/0451B30311451B88493EB7C14999EB68.png title=2.png style=white-space: normal;/>
④  <img src=https://huaweicloudobs.ahjxjy.cn/1AB9FD1A238E2AD3154FE33CBC8D3EF2.png title=4.png style=white-space: normal;/>
【单选题】 下面代码运行后的输出结果为( ) 。 public class X6_1_5 { public static void main(String[] args) { AB aa = new AB(); AB bb; bb = aa; System.out.println(b@@equals(aa)); } } class AB{ int x = 100; }
①  true
②  false
③  编译错误
④  100
【单选题】 下面的程序段创建了BufferedReader类的对象in,以便读取本机c盘my文件夹下的文件1.txt。File构造函数中正确的路径和文件名的表示是( )。 File f = new File(填代码处); file =new FileReader(f); in=new BufferedReader(file);
①  ./1.txt
②  ../my/1.txt
③  c:\\my\\1.txt
④  c:\ my\1.txt
【单选题】 编译运行以下程序后,关于输出结果的说明正确的是 ( ) public class Conditional{ public static void main(String args[ ]){ int x=4; System.out.println(“value is “+ ((x>4) ? 9.9:9)); } }
①  输出结果为:value is 99.9
②  输出结果为:value is 9
③  输出结果为:value is 9.0
④  编译错误
【单选题】 为了使drive11驱动器列表框、dir1目录路径列表框和file1文件列表框能同步协调工作,需要在()。
①  drive1的Change事件过程中加入drive1.Drive=dir1.Path,在dir1的Change事件过程中加入dir1.Path=file1.Path代码
②  drive1的Change事件过程中加入dir1.Path=drive1.Drive,在dir1的Change事件过程中加入file1.Path=dir1.Path代码
③  dir1的Change事件过程中加入dir1.Path=drive1.Drive.Drive,在file1的Click事件过程中加入file1.Path=file1.FileName代码
④  dir1的Change事件过程中加入dir1.Path=drive1.Drive,在file1的Click事件过程中加入file1.Path=dir1.Path代码
随机题目
【单选题】 被誉为“现代课程理论圣经”的课程著作是
①  《儿童与课程》
②  《怎样编制课程》
③  《课程与教学的基本原理》
④  《课程》
【单选题】 在泰勒模式中,课程开发的核心因素是
①  目标因素
②  内容因素
③  组织因素
④  评价因素
【单选题】 在传统教学中,教师是作为先知者把知识传授给学生,这显然不符合非指导性教学的要求。所以,罗杰斯不愿意用“教师”一词,代之以
①  促进者
②  监控者
③  旁观者
④  主导者
【单选题】 美国80年代以来倡导的“卓越教育”是一种
①  精英主义的教育
②  以高质量为核心目标的教育
③  旨在提升国际理解能力的教育
④  谋求平等与高质量兼得的教育
【单选题】 《大学》中曾这样规定教育宗旨:“大学之道在明明德,在亲民,在止于至善。……古之欲明明德于天下者先治其国。欲治其国者先齐其家。欲齐其家者先修其身。欲修其身者先正其心。欲正其心者先诚其意。欲诚其意者先致其知。”这种教育宗旨反映的是课程与教学目标的
①  普遍性目标取向
②  生成性目标取向
③  行为目标取向
④  表现性目标取向
【单选题】 “两种或两种以上学科既在一些主题或观点上相互联系起来,又保持各学科原来的相对独立”,这种课程属于
①  合成课程
②  相关课程
③  融合课程
④  广域课程
【单选题】 在课程研究领域,“课程开发范式”把课程视为
①  师生经验
②  符号表征
③  学校材料
④  学校文化
【单选题】 德国教育家拉伊和梅伊曼主张把教育教学研究建立在生物学、生理学、实验心理学的基础上,运用实验、观察和统计方法,从而使教育学成为科学的教育学,这种科学的教育学被称为
①  理性教育学
②  思辨教育学
③  实验教育学
④  活动教育学
【单选题】 教师向学生作出一定的活动、行动、态度以供学生仿效的教学方法,被称为
①  呈示
②  示范
③  展示
④  口述
【单选题】 把教学设计视为一种工程、一种技术的是
①  忠实取向视野中的教学设计
②  相互适应取向视野中的教学设计
③  创生取向视野中的教学设计
④  实践取向视野中的教学设计