1)类实现一个接口使用下面那个关键字().doc

1)类实现一个接口使用下面那个关键字().doc

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1)类实现一个接口使用下面那个关键字().doc

1)类实现一个接口使用下面那个关键字() implements implement extends d)extend 2、申明公共的abstract方法方式正确的是() public abstract void add(); public abstract add(); public abstract void add(){} public virtual add(); 3、定义整型的最终属性i的正确定义方式是(); a)final i; b)final int i; c)final static int i=8 d)static final int i=0; 4、下面哪个选项是正确的? Class parent{ String name; String nick1; Public parent(String s,String t)throws Exception{ name=s; nick1=t; } public String toString(){ return name; } public class child extends parent{ public child(String s,String t)throws Exception{ super(s,t); } public String toString(){ return name+”and”+nick1; } public static void main(String args[]){ parent a=new parent(“parent”,”john”); parent b=new child(“child”,”Mike”); System.out.println(“a is”+a.toString()); System.out.println(“b is”+b.toString()); } } 运行结果为: a is parent and john b is child and Mike 运行结果为: a is parent b is child 运行结果为: a is parent b is child and Mike d) 编译时出错 5、如何正确调用MyClass中的getName()方法 MyClass::getName(); MyClass. getName (); MyClass xx=new MyClass(); xx. getName (); MyClass xx=new MyClass(); xx( getName (); 6、接口中方法的定义一个方法test正确的是(): public void test(); public void test(){} void test(); void test(){} 7、package packone; class x{ static Float total=5.0f; public x(){ System.out.println(this); Float temp=this.total; } public static void main(String args[]){ x x1=new x(); } } 找出上面程序的错误; 8、下面说法正确的是( ) --------------------------------------------------------------字符串的相加 String s=”abc+”cde”+”efg String s=”aa”+3; int a=1+2; int a=1+1.2; 9、有如下程序: if(i5)System.out.println(“test1”); else if(i9) System.out.println(“test2”); else System.out.println(“test3”); 当i在什么范围时,能够输出test3() 小于0 1到5之间 大于4 大于等于10; if else 的使用; 10、使用Graphics g.drawImage使用方法正确的是() void paint(Graphics g){g.drawImage(picture,10,30);} void paint(Graphics g){g.drawImage(picture,10,30,this);} void paint(Graphics g){g.drawImage(picture,10,30,40,20);} vo

文档评论(0)

shbky123 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档