面向对象语言程序设计课程第五章课件_第1页
面向对象语言程序设计课程第五章课件_第2页
面向对象语言程序设计课程第五章课件_第3页
面向对象语言程序设计课程第五章课件_第4页
面向对象语言程序设计课程第五章课件_第5页
已阅读5页,还剩61页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、面向对象JAVA语言程序设计信息科学与技术学院 网络工程系 周文峰Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.第1页,共66页。第五章 常用系统类 主要任务: 介绍Java常用的系统类,包括字符串类、输入输出流类、 Java Applet类、数学函数类、日期类、随机数类以及向量类等。 Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .

2、Copyright 2004-2011 Aspose Pty Ltd.2第2页,共66页。 主要内容字符串类String类StringBuffer类和StringBuilder类Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.3第3页,共66页。 5.1 字符串类字符与字符串的区别字符是指用单引号括起来单个字符,如a、b、A等。这里的字符不是指占1个字节的ASCII字符,而是指占2个字节的Unicode字符。因为Unicode被设

3、计用来处理现在世界上所有书面语言中的字符,所以一个汉字也是被当作一个字符来处理的。对于单个字符,除了有char这个原始类型以外,Java平台中的java.lang包还专门提供了一个Character类来进行储存和操作。 在计算机科学领 域中,Unicode(统一码、万国 码、单一码、标准万国码)是业界的一种标准。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.4第4页,共66页。 5.1 字符串类字符串是程序设计中经常用到的数据结

4、构,很多编程语言将字符串定义为基本数据类型。但在Java语言中,字符串被定义为类,必须先生成类的实例对象然后才能使用。常用有两种类型的字符串:一种是创建以后不需要改变的,称为字符串常量,在Java中,String类用于存储和处理字符串常量;另外一种字符串是创建以后,需要对其进行改变的,称为字符串变量,在Java中,StringBuffer类用于存储和操作字符串变量。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.5第5页,共66页

5、。字符串与字符串类字符串是一个完整的字符序列,可以包含字母、数字和其它符号。在Java中,用双引号括起来的字符串是字符串常量,又称为无名字符串对象,由Java自动创建。字符串常量可以赋给任何一个String对象引用,这样处理从表面上看起来和其它编程语言没有大的差别,照顾了程序员的习惯,但实际上存在着较大的差异。无论何时,Java中的字符串都是以对象的面孔出现的,在运行时要为它分配内存空间,创建对象引用。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspos

6、e Pty Ltd.6第6页,共66页。Java将字符串定义为类有哪些好处呢?首先,在任何系统平台上都能保证字符串本身以及对字符串的操作是一致的。对于网络环境,这一点是至关重要的。其次,String和StringBuffer经过了精心设计,其功能是可以预见的。为此,二者都被说明为最终类,不能派生子类,以防用户修改其功能。最后,String和StringBuffer类在运行时要经历严格的边界条件检验,它们可以自动捕获异常,提高了程序的健壮性。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyri

7、ght 2004-2011 Aspose Pty Ltd.7第7页,共66页。5.1字符串类字符串对象字符串长度及查找字符串的连接及子串字符串常量与比较String对象的不变性命令行参数Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.8第8页,共66页。5.1.1 字符串类Java语言提供了三个字符串类:String类、StringBuffer类和StringBuilder类。String类是不变字符串,StringBuffer和

8、StringBuilder是可变字符串,这3种字符串都是16位(2个字节)的Unicode字符序列,并且这3个类都被声明为final,因此不能被继承。 Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.9第9页,共66页。5.1.1 字符串类 Java语言用String类表示字符串。一般使用String类的构造方法创建一个字符串对象。String类有13个重载的构造方法,可以生成一个空字符串,也可以由字符或字节数组生成字符串。Str

9、ing类常用的构造方法如下: public String()/ 空字符序列构造字符串对象public String(char value)/字符数组构造字符串对象Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.10第10页,共66页。5.1.1 字符串类public String(char value, int offset, int count)/字符数组的子数组public String(byte bytes )/byte数组

10、构造字符串对象 public String(byte bytes, int offset, int length)public String(String original)/构造一个original的副本 public String(StringBuffer buffer)public String(StringBuilder buffer)Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.11第11页,共66页。5.1.1 字符

11、串类例如:char chars1=A,B,C;char chars2=中,国,;String s1=new String(chars1);String s2=new String(chars2, 0, 4);Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.12第12页,共66页。5.1.1 字符串类在Java中,还有一种特殊的创建String对象的方法,这种方法是直接利用字符串常量创建字符串对象,例如: String s=“Thi

12、s is a Java string.” ; Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.13第13页,共66页。常量串存储在串池中。编译时,每当碰到一个常量串,JVM就会在串池中搜索,如果此串存在,则直接使用这个现成的串;如果没有,就在串池中创建一个新串。String x=“abcd”;String y=“abcd”;String z=“1234”;xyz串池对象:”abcd”对象:”1234” x,y,z并不是真正的对象,

13、只是指向对象存储位置的引用。(C语言中称为指针)栈内存 搜索没找到找到nullnullnull字符串的内存分配(字符串常量)Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.14第14页,共66页。字符串变量与字符串常量不存储在同样的位置。字符串的内存分配(创建串对象)String x=new String(“abcd”);x对象:”abcd”对象:”abcd”其它常量对象串池null搜索找到复制栈内存 堆内存 Evaluation

14、 only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.15第15页,共66页。5.1.2 字符串长度及查找创建String类对象外,更常用的是调用String类的方法,该类定义了许多方法。public int length() 返回字符串的长度,即字符串包含的字符个数。注意对含有汉字和其他语言符号的字符串,计算长度时,一个符号作为一个字符计数。例如获取字符串“MingRiSoft”长度的代码如下:String nameStr = MingRiSoft;in

15、t i = nameStr.length();/ 获得字符串的长度为10Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.16第16页,共66页。5.1.2 字符串长度及查找 public int indexOf(int ch)查找字符ch第一次出现的位置。如果查找不成功则返回-1。 public int indexOf(int ch, int fromIndex )查找字符ch从fromIndex开始第一次出现的位置(在原字符串中

16、的下标)。 String str = mingrikeji;int i = str.indexOf(i);System.out.println(字符i第一次出现在索引: + i); / 索引值是1Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.17第17页,共66页。5.1.2 字符串长度及查找 public int indexOf(String str)查找字符串str第一次出现的位置。如果查找不成功则返回-1。 public

17、int indexOf(String str, int fromIndex )查找字符串str从fromIndex开始第一次出现的位置(在原字符串中的下标)。String str = mingrikeji;i = str.IndexOf(ri);System.out.println(“字符串“ri”第一次出现在索引: + i); / 索引值是4Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.18第18页,共66页。5.1.2 字符

18、串长度及查找 public int lastIndexOf(int ch)查找字符ch最后一次出现的位置。 public int lastIndexOf(int ch, int endIndex)查找字符ch到endIndex为止最后一次出现的位置。String str = mingrikeji;i = str.lastIndexOf(i);System.out.println(字符i最后一次出现在索引: + i); / 索引值是9i = str.lastIndexOf(i, 4);System.out.println(“到第4个字符为止,字符i最后一次出现在索引: + i);/ 索引值是1E

19、valuation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.19第19页,共66页。5.1.2 字符串长度及查找 public int lastIndexOf(String str)查找字符串str最后一次出现的位置。 public int lastIndexOf(String str, int endIndex)查找字符串str到endIndex为止最后一次出现的位置(在原字符串中的下标)。String str = mingrikeji;i

20、= str.lastIndexOf(ri);System.out.println(“字符串ri最后一次出现在索引: + i); / 索引值是4Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.20第20页,共66页。5.1.3 字符串的连接与子串 public String concat(String str)调用字符串与参数字符串连接起来,产生一个新的字符串。 public String substring(int beginIn

21、dex, int endIndex)从字符串的下标beginIndex开始到endIndex结束产生一个子字符串。(不包含endIndex处的字符) public String substring(int beginIndex)从字符串的下标beginIndex开始到结束产生一个子字符串。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.21第21页,共66页。5.1.3 字符串的连接与子串 public char charAt(i

22、nt index)返回字符串中指定位置的字符,index表示位置,范围为0s.length()-1。 public String replace(char oldChar, char newChar)将调用字符串中的所有oldChar字符改变为newChar字符,返回一个新的字符串。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.22第22页,共66页。5.1.3 字符串的连接与子串 public String toUpperCa

23、se() public String toLowerCase()将字符串转换成大写或小写字母。 public boolean startsWith(String prefix) public boolean endsWith(String suffix)返回字符串是否以某个字符串开始或结尾。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.23第23页,共66页。5.1.3 字符串的连接与子串 public void getChar

24、s(int srcBegin, int srcEnd, char dst, int dstBegin)将字符串中从起始位置(srcBegin)到结束位置(srcEnd)之间的字符复制到字符数组dst中从起始位置为dstBegin。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.24第24页,共66页。5.1.3 字符串的连接与子串下面的程序说明了String对象的使用。 String s=new String(This is a

25、Java string.) ; System.out.println(s.length(); / 22 System.out.println(s.charAt(10); / J System.out.println(s.lastIndexOf(a); / 13 System.out.println(s.lastIndexOf(a,10); / 8 System.out.println(s.indexOf(is); / 2Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2

26、011 Aspose Pty Ltd.25第25页,共66页。5.1.3 字符串的连接与子串 String s=new String(This is a Java string.) ; System.out.println(s.lastIndexOf(is); / 5 System.out.println(s.indexOf(my); / -1 char subs=new char4; s.getChars(10,14,subs,0); System.out.println(subs); /JavaEvaluation only.Created with Aspose.Slides for .

27、NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.26第26页,共66页。5.1.3 字符串的连接与子串 String s=new String(This is a Java string.) ; String s1=Its interesting.; s1=s.concat(s1); System.out.println(s.toUpperCase(); /THIS IS A JAVA STRING. System.out.println(s1.toLowerCase(); /this is a java string.it

28、s interesting. System.out.println(s.endsWith(in); /falseEvaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.27第27页,共66页。5.1.4 字符串解析String类提供了一个split()方法,它用来实现将一个字符串分解成子字符串或令牌(token)。该方法使用正则表达式指定分隔符public String split(String regex, int limit) pub

29、lic String split(String regex) Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.28第28页,共66页。public class SplitDemopublic static void main(String args)String ss=11,22,33;System.out.println(ss);String str=ss.split(,);System.out.println(str0);Sy

30、stem.out.println(str1);System.out.println(str2); Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.29第29页,共66页。5.1.5 字符串常量与字符串比较在Java程序中,凡是由双引号定界的字符序列都是字符串常量(literal string),如”abc”。 字符串常量存放在字符串常量池(pool of literal string)中。字符串常量也是String类的对象,可以直

31、接使用,例如:System.out.println(Hello.length(); /结果输出5 Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.30第30页,共66页。1.字符串相等的比较 你可能想到用“=”号来比较,如下代码所示。String s1 = new String(Hello);String s2 = new String(Hello);System.out.println(s1=s2);5.1.5 字符串常量与字符

32、串比较Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.31第31页,共66页。再看下面一段代码: String s1 = “Hello” ; String s2 = “Hello” ; System.out.println(s1=s2); Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspos

33、e Pty Ltd.32第32页,共66页。String str1 = abc;String str2 = abc;System.out.println(str1=str2); /true 字符串的比较str1str2串池对象:”abc”栈内存 搜索找到nullnull没找到Str1与str2存储的是同一块内存地址Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.33第33页,共66页。String str1 =new String

34、 (abc);String str2 =new String (abc);System.out.println(str1= =str2); / false字符串的比较str2对象:”abc”对象:”abc”其它常量对象串池null搜索找到复制栈内存 堆内存 str1对象:”abc”nullstr1与str2存储的是堆内存中的不同地址Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.34第34页,共66页。 如果要比较两个对象的内容是

35、否相等,可以使用String类的equals()方法。对于上面两种情况,表达式: s1.equals(s2); 的结果都为true,因为s1、s2的内容都相等。 例如比较字符串“A”和字符串“a”是否相等:注意:equals()方法在比较两个字符串时区分字母大小写。String str = A;boolean b = str.equals(“a”);/ 比较结果b为falseEvaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.35第3

36、5页,共66页。2. 字符串大小的比较 要比较字符串的大小,可以使用String类的compareTo()方法,该方法的格式为: public int compareTo(String anotherString)Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.36第36页,共66页。 字符串比较使用字符的Unicode码值进行比较。若当前字符串小于参数字符串时,方法返回值小于0,若当前字符串大于参数字符串时,方法返回值大于0,若

37、当前字符串等于参数字符串时,方法返回值等于0。例如,表达式: “abc”.compareTo(“abd”)/返回值为-1。 Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.37第37页,共66页。 对于字符串相等和大小比较还可以忽略大小写,可以使用下面两个方法:public boolean equalsIgnoreCase(String anotherString)public int compareToIgnoreCase(St

38、ring anotherString)注意,字符串不能使用、=、java ThreeInteger “23” “-234” “100” 程序运行结果为: max=100 min=-234Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.46第46页,共66页。 注意:命令行参数传递的是字符串,若将其作为数值处理,需要进行转换。若字符串中含有非数值字符,则抛出NumberFormatException运行时异常。 根据传递的参数个数确

39、定数组args的长度,如果给出的参数少于引用的元素,则抛出ArrayIndexOutOfBoundsException运行时异常。 如D:java ThreeInteger “23” “-234”Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.47第47页,共66页。5.2 StringBuilder和StringBuffer类创建StringBuffer对象StringBuffer对象的访问和修改StringBuilder类Ev

40、aluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.48第48页,共66页。5.2.1 创建StringBuffer对象字符串缓冲区类StringBuffer类是字符串的另一种处理办法。StringBuffer类常用的构造方法有下面三个:public StringBuffer ()创建一个没有字符的字符串缓冲区,初始容量为16个字符。此时length()方法的值为0,而capacity()方法的值为16。 Evaluation only.

41、Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.49第49页,共66页。public StringBuffer (int capacity)创建一个没有字符的字符串缓冲区,capacity为指定的初始容量。 public StringBuffer (String str)利用一个已存在的字符串对象str创建一个字符串缓冲区对象,另外再分配16个字符的缓冲区。 Evaluation only.Created with Aspose.Slides for .NET

42、3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.50第50页,共66页。StringBuffer类除定义了length()、charAt()、getChars()、indexOf()等方法外,还提供了下列常用方法:public int capacity() 返回当前的字符串缓冲区的容量。public void setCharAt(int index, char ch)用ch修改指定位置的字符。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile

43、.Copyright 2004-2011 Aspose Pty Ltd.51第51页,共66页。public StringBuffer deleteCharAt(int index)删除指定位置的字符。public StringBuffer append(String str)向当前的字符串的末尾添加一个字符串。该方法有一系列的重载方法,参数可以是boolean、char、int、long、 float、double、char等任何数据类型。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyr

44、ight 2004-2011 Aspose Pty Ltd.52第52页,共66页。public StringBuffer insert(int offset, String str)从当前字符串的指定位置插入一个字符串。这个方法个也有多个重载的方法,参数可以是boolean、char、int、long、 float、double、char等类型。public StringBuffer delete(int start, int end)删除从start开始到end(不包括end)之间的字符。Evaluation only.Created with Aspose.Slides for .NET

45、 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.53第53页,共66页。public StringBuffer replace(int start, int end, String str)用字符串str替换从start开始到end(不包括end)之间的字符。public StringBuffer reverse()将字符串的所有字符反转。public StringBuffer substring(int start)返回从start开始到字符串末尾的子字符串 Evaluation only.Created with Aspose

46、.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.54第54页,共66页。public StringBuffer substring(int start, int end)返回从start开始到end(不包括end)之间的子字符串。例:下面程序演示了StringBuffer对象及其方法的使用。 StringBuffer sb=new StringBuffer (Hello); System.out.println(sb);/Hello System.out.println(sb.length();/5

47、 System.out.println(sb.capacity(); /21Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.55第55页,共66页。 sb.append(Java); System.out.println(sb); /HelloJava System.out.println(sb.insert(5,“,”); /Hello,Java System.out.println(sb.replace(6,10,World!

48、); / Hello,World! System.out.println(sb.reverse(); /!dlroW,olleH Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.56第56页,共66页。5.2.3 StringBuilder类StringBuilder类与StringBuffer类的区别是StringBuffer类的实例是线程安全的,StringBuilder类的实例不是线程安全的。如果需要线程同步,推荐使用Str

49、ingBuffer类。Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.57第57页,共66页。习题1. 下列关于构造方法描述错误的是 。 A.Java语言规定构造方法名与类名必须相同; B.Java语言规定构造方法没有返回值,但不用void声明; C.Java语言规定构造方法不可以重载; D.Java语言规定构造方法只能通过new自动调用。2. 已知语句int a=1, 2, 3;下列描述错误的是 。A.定义了一个名为a的一维数组

50、 B.数组a有3个元素C.数组a中每个元素都是整型D.数组元素a3的值为3Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.58第58页,共66页。习题3下列选项中,用于在定义子类时声明父类名的关键字是 。A.interfaceB.packageC.extendsD.class4. 设 i、j、k 为类 x 中定义的 int 型变量名,下列类 x 的构造函数中不正确的是 。 A. x( int m) . B. void x( int

51、 m) . C. x( int m, int n) . D. x( int h,int m,int n) . 5.Java 和 c+都是面向对象的程序设计语言。( )6. 同一个类中定义多个参数列表不同的同名方法,叫做方法的重载。( )Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.59第59页,共66页。习题7.一个程序里可以有多个父类,也可以有多个主类。()8.一个子类可以重新定义从父类那里继承来的同名方法,而且允许它们有不同

52、的返回值。()9.Java application中的主类需包含main方法,main方法的返回类型是 。 A.int B.float C.double D.void 10.在类的定义中可以有两个同名方法,这种现象称为方法 。 A.封装 B.继承 C.覆盖 D.重载Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.60第60页,共66页。11. 下列程序的输出结果是 。class Fpublic F() System.out.pri

53、nt(F() is called!); class S extends Fpublic S() System.out.print(S() is called!); public class Expublic static void main(String args)S sa=new S();A)F() is called! B)S() is called!C)F() is called! S() is called! D)S() is called! F() is called!Evaluation only.Created with Aspose.Slides for .NET 3.5 Client Profile .Copyright 2004-2011 Aspose Pty Ltd.61第61页,共66页。习题12.现有类说明如下:classAintx=10;intGetA()returnx;classBextendsAintx=100;intGetB () returnx;问题:1)类B是否能继承类A的属性x?2)若b是类B的对象,则b.GetB()的返回值是什么?3)若b是类B的对象

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论