填空题以下程序运行后输出的结果是______。 #include <string.h> void fun(char *s, int p,int k) int i; for(i=p;i<k-1;i++) s[i]=s[i+2]; void main() char s[]="abcdefg"; fun(s,3,strlen(s)); puts(s);
填空题线程的 【11】 方法只会使具有与当前线程相同优先级的线程有运行的机会。
填空题创建一个显示“选项”的菜单项对象mi的正确语句是______。
填空题如果子类中覆盖了父类的同名方法,则在子类中调用父类中的同名方法时用关键字 【13】 ;在一个类的内部可以直接调用本类的对象,也可通过关键字this来调用。
填空题Java设立了一种追踪图像加载过程的机制,实现这种机制有两种方法:一是使用{{U}} 【12】 {{/U}}类,另一种是实现ImageObserver接口。
填空题下列程序段的输出结果为__________。 int a=2; switch (a) case2: System.out.print("Value is2."); case3: System.out.pritln("Value is3."); break; default: System.out.println("end"); break:
填空题抽象窗口工具包{{U}} 【11】 {{/U}}提供用于所有Java applets及应用程序中的基本GUI组件。
填空题采用GridLayout布局管理器的容器,其中的各构件呈______布局。
填空题为了向一个Applet传递参数,可以在HTML文件的Applet标志中使用PARAM选项。在Applet程序中获取参数时,应使用的方法是 【15】 。
填空题软件开发环境是全面支持软件开发全过程的 【4】 集合。
填空题在Java中,常量null、false和________都是小写。
填空题Java简单性首先表现在自身系统的精练,它的基本解释程序和【 】占内存40KB,附加的基本标准类库和支持线程程序占175KB。
填空题本题的功能是用按钮来控制文字的颜色。窗口中有三个按钮“Yellow”、“Blue”和“Red”,它们分别对应文字标签中文本的颜色为黄色、蓝色和红色,单击任意一个按钮,文字标签中的文本就变成按钮对应的颜色。 import java. awt. * ; import java. awt. event. * ; import javax. swing. * ; class ButtonPanel extends JPanel implements ActionListener public ButtonPanel() yellowButton=new JButton("Yellow"); blueButton=new JButton("Blue"); redButton=new JButton("Red"); jl=new JLabel("I am from China!"); add(yellowButton); add(blueButton); add(redButton); add(jl); yellowButton. addActionListener(this); blueButton. addActionListener(this); redButton. addActionListener(this); public void actionPerformed(ActionEvent evt) Object source=evt. getSource(); Color color=getForeground(); if(source==yellowButton) color=Color. yellow; else if(source==blueButton) color=Color. blue; else if(source==redButton) color=Color. red; ______; ______; private JButton yellowButton; private JButton blueButton; private JButton redButton; private JLabel jl; class ButtonFrame extends JFrame public ButtonFrame() setTitle("exam_16"); setSize(300,200); addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) System. exit(0); ); Container contentPane=getContentPane(); contentPane, add(new ButtonPanel()); public class java2 public static void main(String[] args) JFrame frame=new ButtonFrame(); frame. show();
填空题设一棵二叉树中有3个叶子结点,有8个度为l的结点,则该二叉树中总的结点数为{{U}} 【1】 {{/U}}。
填空题下列是一个类的定义程序段,请补充完整。
public class My Class {
int x,y; MyClass(int i,【 】) {
x=i;y=j;
}
}
填空题编写同时具有Applet 与Application 的特征的程序,具体方法是:作为Application 要定义main()方法,并且把所在的类定义为一个 【12】 类。为使该程序成为一个Applet,main()方法所在的这个类必须继承Applet 类或 【13】 类。
填空题在选择运算所得到的结果关系中,所含的元组数不能{{U}} 【5】 {{U}}原关系中的元组数。{{/U}}{{/U}}
填空题Java程序包括源代码(java文件)、 【13】 、由归档工具生成jar生成的.jar文件、对象状态序列化.set文件。
填空题按照逻辑结构分类,数据结构可分为线性结构和非线性结构,栈属于______。
填空题Java语言的各种数据类之间提供两种转换:______和强制转换。
