单项选择题
在JAVA语言中,下列语句()可以画出一矩形框架,其距上边界为10,宽为30像素,高为40象素
A.Graphics g=new Craphics(); g.drawRect(10,0,30,40);
B.Graphics g=new Craphics(); g.drawRect(0,10,30, 40);
C.Graphics g=new Craphics(); g.drawRect(30,40,10, 0);
D.Graphics g=new Craphics(); g.drawRect(30,40,0,10);
相关考题
-
单项选择题
实体Bean的生命周期中,只有在()方法成功完场后,ejbPostCeate()方法才能调用
A.ejbActivate()
B.ejbPassivate()
C.ejbCreate()
D.ejbRemove() -
单项选择题
J2EE中,标记的作用是()。
A.<jsp:setProperty>和<jsp:getProperty>必须在一个jsp文件中搭配出现
B.就如同session.setAttribute()一样,来设置属性/值对
C.和<jsp:useBean>动作一起使用,来设置bean的属性值
D.就如同request.setAttribute()一样,来设置属性/值对 -
单项选择题
在J2EE中,对于简单属性的方法: public Color getColor(){…} 和public Void setColor(Color c){…} 假定color是类中的属性,在方法体内可以()
A. 在getColor方法体内只能有一行代码:return color; 在setColor方法体内只能有一行代码: this.color=c;
B. 在getColor方法体内只能有一行代码:return color; 在setColor方法体内一定有该行代码: this.color=c;但还可以有其他的代码
C. 在getColor方法体内一定有该行代码:return color; 但还可以有其他的代码, 在setColor方法体内只能有该行代码: this.color=c;
D. 在getColor方法体内一定要有该行代码:return color; 但还可以有其他的代码,在setColor方法体内一定有该行代码: this.color=c;但还可以有其他的代码
