首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
请在每条横线处填写一个语句,使程序的功能完整,且输出结果为911。 注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。 public class Outer { public
请在每条横线处填写一个语句,使程序的功能完整,且输出结果为911。 注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。 public class Outer { public
admin
2009-01-15
24
问题
请在每条横线处填写一个语句,使程序的功能完整,且输出结果为911。
注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。
public class Outer
{
public static void main(String args[])
{
Outer i=new Outer();
i.taskInner();
}
public class lnner
{
private int size;
public void doSomething(int size)
{
__________//访问局部变量
this.size++;//访问内部类的成员变量
__________//访问外部类的成员变量
System.out.println(size+" "+this.size+" "+Outer.this.size);
}
}
public void tasklnner()
{
__________
k.doSomething(8);
}
private static int size;
}
选项
答案
size++; Outer.this.size++; Inner k=new lnner();
解析
转载请注明原文地址:https://jikaoti.com/ti/Oyb0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
使用SQL语句将表S中字段price的值大于30的记录删除,正确的命令是
下面程序的运行结果是:SETTALKOFFn=1DOproc1WITH(n)?n+2PROCEDUREproc1PARAMETERSnFORk=2TO4n=n+kENDFORRETURN
定义无符号整数类为UInt,下面可以作为类UInt实例化值的是
VisualFoxPro支持的索引文件不包括
在表单中为表格控件指定数据源的属性是
假设有一表单,其中包含一个选项按钮组,在表单运行启动时,最后触发的事件是
(1)在考生文件夹下建立一个文件名和表单名均为myform的表单文件。(2)在考生文件夹下建立一个如下图所示的快捷菜单mymenu,该快捷菜单有两个选项“取前三名”和“取前五名”。分别为两个选项建立过程,使得程序运行时,单击“取前三名”选项的功能
下列特征中不是面向对象方法的主要特征的是()。
假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1。命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,正确的表达式是
Java语言有自动收集垃圾功能,周期性的回收一些长期不用的对象占用的内存。下列哪些是对象的清除的途径? ①依靠Java的垃圾回收机制回收内存 ②调用System.gc(),请求垃圾回收 ③Java系统开始运行时,自动调用java.lang.Obje
随机试题
一氧化碳中毒的治疗包括
营养素密度为能量密度为
急性菌痢按照临床表现可分为
盐炙黄柏的作用是()。
某市质监局发现一公司生产劣质产品,查封了公司的生产厂房和设备,之后决定没收全部劣质产品、罚款10万元。该公司逾期不缴纳罚款。下列哪一选项是错误的?
无论是气焊或电弧焊接的焊接方式,按其操作位置不同,焊接的结构形式可分为()。
保温材料按材质可分为()。
背景某施工单位承建了天津市某医院门诊楼工程。地下2层,地上16层,钢筋混凝土筏板基础,地上结构为钢筋混凝土框架结构,墙充填为普通混凝土小型空心砌块。施工过程中发生如下事件:事件一:本工程基坑深8.5m,北侧紧邻某住宅楼。经专家论证后的方案采用围护桩墙+
写字楼物业的租约由于要持续较长的时间,在租约中一般都要包括规定租金定期增加方式的()。
唐太宗说:“以天下之广,四海之众,千端万绪,须合变通,皆委百司商量,宰相筹划,于事稳便,方可奏行。岂得以一日万机,独断一人之虑也。”材料表明他主张()。
最新回复
(
0
)