整专业资料
微信QQ群
考生网QQ群

群号:517231281

扫码加群
点击二维码加群

考生网微信公众号

微信号:zikaosw

课程试听
最新资讯

手机端访问

1、直接输入www.zikaosw.cn
2、扫描左侧二维码

登录 | 注册
登录/注册后,可享受
  • 课程免费试听
  • 试做在线题库
  • 学习提升指导
  • [填空题] 第7题 采用______布局的容器中多个组件拥有同一个显示空间,某一时刻只能显示一个组件。
     

     纠错    

  • 助考班推荐

您可能感兴趣的试题

  • 1、[单选题]在Java语言中,支持网络通信的软件所在的包是()

    • A、java.util
    • B、java.net
    • C、java.io
    • D、java.internet
  • 2、[填空题]在Java语言中有定义:char c[]-{0',1,2', '3', '4'};则c. length-.
    【原题如下】
    题中横线处答案为:______。

     

  • 3、[主观题]【简答题】阅读下面程序,如果在横线上分别填写①i=m②i=b③i=p.a④i=p.change(100)四个赋值语句,有哪些不合法?请写出原因。
    class  Class2201
    {
    private  int  a;
    public  int  change(int  m){return  m;}
    }
    public  class  Class22  extends  Person
    {
    public  int  b;
    public  static  void  main(String[]args)
    {
    Class2201  p=new  Class2201();
    Class22    t=new  Class22();
    int  i;
    ___;
    }
    }
     

  • 4、[主观题]【程序设计题】设计一个应用程序,原始数据从程序界面的一个文本区输入,用户点击按钮后,在另一个文本区上输出排序后的数据,并将排序后的数据输出到文件中。已给出部分代码,请完成程序。
    import  java.io.*;
    import  java.util.*;
    import  java.awt.*;
    import  javax.swing.*;
    import  java.awt.event.*;
    public  class  Class3805  implements  ActionListener
    {
    JTextArea  ta1=new  JTextArea(10,20);
    JTextArea  ta2=new  JTextArea(10,20);
    JButton  butt=new  JButton("SortAndSave");
    public  static  void  main(String[]  args)
    {
    new  Class3805();
    }
    public  Class3805()
    {
    JFrame  myWin=new  JFrame("Class3805");
    myWin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container  con=myWin.getContentPane();
    con.setLayout(new  FlowLayout());
    con.setBackground(Color.blue);
    con.add(ta1);con.add(butt);con.add(ta2);
    myWin.setBounds(200,200,600,300);
    butt.addActionListener(this);
    myWin.setVisible(true);
    }
    public  void  actionPerformed(ActionEvent  e)
    {
    //这里是你要编写的代码
    }
    }
      int n=str.countTokens();
    int a[]=new int[n];
    int i=-1,j;
    while(++i{
    a[i]=Integer.parseInt(str.nextToken());
    }
    for(i=0;ifor(j=i+1;j{
    if(a[i]>a[j])
    {int t=a[i];a[i]=a[j];a[j]=t;}
    }
    for(i=0;i{
    ta2.append(a[i]+" ");
    }
    RandomAccessFile out=null;
    try
    {
    out=new RandomAccessFile("3805.txt","rw");
    out.writeBytes(ta2.getText());
    }
    catch(FileNotFoundException e1){}
    catch(IOException e2){}" />

  • 5、[主观题]【程序分析题】阅读下列程序,写出程序运行结果。
    import  java.awt.event.*;
    import  javax.swing.*;
    public  class  C3502  implements  MouseMotionListener
    {
    JTextField  text=new  JTextField(30);
    C3502()
    {
    JFrame  myWin=new  JFrame("Ex0611");
    myWin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    myWin.setBounds(100,100,300,100);
    myWin.getContentPane().add(text,"North");
    myWin.addMouseMotionListener(this);
    myWin.setVisible(true);
    }
    public  void  mouseDragged(MouseEvent  e)
    {
    int  x=e.getX(),y=e.getY();
    text.setText("拖动鼠标,鼠标坐标为:"+x+","+y);
    }
    public  void  mouseMoved(MouseEvent  e)
    {
    int  x=e.getX(),y=e.getY();
    text.setText("移动鼠标,鼠标坐标为:"+x+","+y);
    }
    public  static  void  main(String[]  args)
    {
    new  C3502();
    }
    }
     

Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.

温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。