- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
08slideJava基础教程好
Objectives;Introduction(P262 8.1);Strings Are Immutable(8.2.2);Construct a String;Interned Strings;Interned Strings(8.2.2);Examples(8.2.2);Finding String Length(8.2.4);Retrieving Individual Character(8.2.4);Exercise 1;Exercise 2(P270 listing8.1);Exercise 3;Obtaining Substrings(8.2.6);Finding a Character or a Substring(8.2.8);Example;Finding a Character or a Substring(8.2.8);Example;Exercise 4;Exercise 5;Exercise 6;Exercise 7;String Comparisons(8.2.3);思考题;public boolean equals(Object anObject) { if (this == anObject) { return true; } if (anObject instanceof String) { String anotherString = (String)anObject; int n = count; if (n == anotherString.count) { char v1[] = value; char v2[] = anotherString.value; int i = offset; int j = anotherString.offset; while (n-- != 0) { if (v1[i++] != v2[j++]) return false; } return true; } } return false; };String Comparisons(8.2.3);Matching String(8.6.1);“.”代表任何字符 “\d”代表任何数字,“\D”代表任何非数字字符 “\s”代表空格,“\S”代表任何非空格字符 “x*”代表0个或多个x,(xy)*代表0个或多个xy “x?”代表0个或1个x,(xy)?代表0个或1个xy “x+”代表1个或多个x,(xy)+代表1个或多个xy [xyz]表示取x,y,z其中一个 [0-9]表示取0-9其中一个 x|y|z表示取x,y,z其中一个 “x{5}”表示5个x “x{5,}”表示至少5个x “x{5,8}”表示至少5个x,最多8个x (xyz){2}表示xyz出现两次 ;Exercise 8;Exercise 9;String Conversions(8.2.7);Split string;Convert Character and Numbers to Strings(8.2.10);Exercise 10;The StringBuffer Class(P273 8.4);StringBuffer Constructors;Appending New Contentsinto a String Buffer;insert New Contentsinto a String Buffer;delete Contentsfrom a String Buffer;modify String Buffer;Exercise 15;Exercise 16;The Character Class;Example;Example;Example;Example;Exercise 11;Exercise 12;Exercise 13;Exercise 14;The File Class;52;import java.io.*; public class TestFileClass { public static void main(String[] args) { File file = new File(“d:/image/us.gif); System.out.println(Does it exist? + file.exists()); System.out.println(Can it be read? + file.canRead()); System.out.println(Can it be written? + file.canWrite());
文档评论(0)