Java程序设计精编教程(第2版)习题解答_第1页
Java程序设计精编教程(第2版)习题解答_第2页
Java程序设计精编教程(第2版)习题解答_第3页
Java程序设计精编教程(第2版)习题解答_第4页
Java程序设计精编教程(第2版)习题解答_第5页
免费预览已结束,剩余40页可下载查看

付费下载

下载本文档

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

文档简介

1、习题解答习题一(第1章)1。Ja mes Gosl i ng2. 需 3个步骤:1)2)3)3 . s et用文本编辑器编写源文件。使用javac编译源文件,得到字节码文件。 使用解释器运行程序。ibrt、ja r;、c lasspath=D: j d k4、5、BJa va源文件得扩展名就是、java, J a va字节码得扩展名就是、c 1ass.6。D.习题二(第2章)1.heightbottomTeacher、j avap u blic class T ea cher d o uble add(double a, doub le b)return a + b;doub 1 e s u

2、b(double a, d ou b le b) r e t ur n a-b;Stu d en t、publicjavacl a ss Stude ntp ub 1 ic void speakSyste m、ou()t、pri n tl n ("老师好");MainClass、jpu b1 ic c pu b lic1 ass M ainClass s t atic v o id m a in( S tring arg s ),不可以把关键字作为名字来e num e xte nd s a b s t r act .SS im P leme n ts inte r face

3、3。456、b oo l ean, cha r,属于操作题 ,解答略 .属于操作题,解答略pub lic cl ass Ebyte, s ho r t, int, lo ng , fl oa t,double。Teacher z han g = n ew Tea cher();Sy ste m、o u t、pr in tln (zha n g、add( 1 2, 236);S y s tem、out、pri ntl n(z h ang、add (234, 120 );Stu d ent j iang=ne w St udent();j iang、speak ();3. 如果源文件中有多个类,但

4、没有pu blic类,那么源文件得名字只要与某个类得名字相同并且扩展名就是、ja va就可以了,如果有一个类就是Publ 1 c类,那么源文件得名字必须与这个类得名字完全相同,扩展名就是、java.4。行尾风格。习题三(第3章)1. 用来标识类名、变量名、方法名、类型名、数组名、文件名得有效字符序列称为标识符。 标识符由字母、下划线、美元符号与数字组成,第一个字符不能就是数字。true 不就是标识符。2。关键字就就是 Jav a 语言中已经被赋予特定意义得一些单词 用。不就是关键字。 clapubli c stati c voi d main (String a rgs ) cha r cSt

5、a r t=' A ', c End='Z'for(char c=cSt a rt;c =cEnd;c +) Sys tem、 ou t、print (" c);7。不可以。习题四(第4章)1。 110.不规范 .2. 新亲亲斤!3.publi c clas s Jud ge A w ar d v oid g iveM ess (int n u mber)if (num b e r=9|numbe r= =131 | numb e r= 12)System、out、pr i ntln( n umber +” 就是三等奖" );else 1 f

6、 (n um ber= 2 09| num be r=596 | | number= =27)S ys t em、out、pri n tln (number+ ”就是二等奖 ");else l f ( num b er =875| | n um b er=31 6| n u mb er= = 5 9)S y st em、ou t、pr int l n(n u mber+"就是一等奖");e l s eSy stem、o ut、 printl n ("未中奖”);4。import java、 util、 Scan ner;pu b li c class p

7、u ter p ubl ic st a ti c void main (Strin g arg s ));Scanne r reader =new Sc ann er( System、indoub le amount = 0;/存放电量doub le price = 0;/用户需要交纳得电费S ystem、out、pr i nt( ”输入电量:”);amount =r eader、 ne xtDo ubl e();1 f( amoun t < = 90 &&p r i c e = am ount * 0、amoun t> = 1) 6;/计算pr ic e得值e I

8、se if(a m ount <= 1 5 0& & amount>=9 1 )p ri ce = 9 0* 0、6+( am ou nt -90) *1、1;/计算p r ice得值e lse if(amou nt> 15 0)price = 90 * 0、6+ ( 1 50-90) * 1、1 + ( a m o unt 1 5 0)*1、7;/ /计算 p r ice 得else S yste m、 out、 print ln( "输入电量 :”+amount +”不合理 ");Sy stemou t、p r i nt f("

9、;电费: 5、2 f", price);5publi cpublilass E s tatic vo l d main ( St ring a rg s )char cSt art=A, cEn d=Z;f or (ch a r c=cS t art; c<= cEnd; c + +)Sy stem、o ut、 pr intf (”2c", c);S ystem、o ut、p ri ntln () ;for (c har c=cStart;cv = cEnd;c+)Syst em、 ou t、p rintf( 2c", (c32);6public cla s

10、s X it i 5p u b lic s t ati c vo id mai n( S tri n g arg s)int sum=0, i, j ;f o r(i= 1 ; i <= 100 0 ;i+ +)for(j=1 , sum=0 ;j < i ;j + +) if (i% j =0)sum= s um +j;f(s u m=i)System、o ut、print ln"完数 : ”+i );publicpublic s taEti c void main(St ring a rg s )i n t n = 1, i = 1, j i ech en g=1 ;

11、lon g sum=0;whil e( tru e) jiec heng=1 ;for(i=1 ; i=n;i+)j i echeng=jiecheng* i ;sum=sumjiecheng;c lassif(sum>98 7 6)break;n+;System、ou t 、 pr i ntln (”满足条件得最大整数: ”+(n 1);习题五(第5章)1.用类创建对象时。2。一个类中可以有多个方法具有相同得名字, 但这些方法得参数必须不同, 即或者就是参数得个数不同,或者就是参数得类型不同 . 可以。3。 可以 . 不可以。4。不可以。5个类通过使用n ew运算符可以创建多个不同得对

12、象,不同得对象得实例变量将被分配 不同得内存空间。所有对象得类变量都分配给相同得一处内存,对象共享类变量。6 oC Do7. 【代码1】 【代码 4】。8. sum = 1 00。9、 27。10. 1 00 与 2 0、0o习题六(第 6 章 )1。如果子类与父类在同一个包中,那么,子类自然地继承了其父类中不就是Pri va te得成员变量作为自己得成员变量,并且也自然地继承了父类中不就是P r ivat e得方法作为自己得方法 , 继承得成员或方法得访问权限保持不变。当子类与父类不在同一个包中时,父类 中得P ri v at e与友好访问权限得成员变量不会被子类继承,也就就是说,子类只继承

13、父类中得P ro tec t e d与public访问权限得成员变量作为子类得成员变量;同样,子类只继承父 类中得prot e cted与publi c访问权限得方法作为子类得方法。如果所声明得成员得变量得 名字与从父类继承来得成员变量得名字相同(声明得类型可以不同) ,在这种情况下 ,子类就 会隐藏掉所继承得成员变量。2不可以 .3o abs tr act 类.3. A类就是B类得父类,当用子类创建一个对象 b,并把这个对象b得引用放到父类得对象a 中时,称a就是b得上转型对象。5。AD 。6. l 5、 08、0 .7. 98、012。习题七(第 7 章 )1. 不能 .2. 不能.那么该

14、接口变3. 可以把实现某一接口得类创建得对象得引用赋给该接口声明得接口变量中。 量就可以调用被类实现得接口中得方法。4o 15、08。4. 1815.习题八 (第 8 章)lo有效。2。可以。3。不可以。4。大家好,祝工作顺利 !习题九(第 9 章)2.Love: G a me。315a be我们。4357 9。avaHell o .5.9j5. pu b lic cl a ss E pub 1 ic st atic void m ai n (String a r gs )Stri n g s1, s2, t1 = "A B CDab cd" s1=t1 、t oUpper

15、Case();s2=t1 、 toL owe rCas e();Sys te m、 out、S yst em、 out、Stri ng s 3=s1 、Sy stem、 out、 println(s 1); pr l ntln (s2); concat (s 2); print ln(s3) ;7、p u b 1 ic class Epubl i c stat i c V oid mai n (String ar gs )St ri ng s="ABCDa b cd"c h a r cSt art = s、charAt(0 );out、pr int1 n(cS t art)

16、; p r intln (cE nd);ch a r cEn d = s、ch a rAt(s、len gt h () -1); Syst em、out、Sy Stem、8、im portpublicpublic static voi d main (Strin g a rgs)Scanner re ad =new Scanner (Sys tem、i n); Ca len d arBean cb = n ew C a lendarBea n (); int year= 200 0 ,mon t h= 1;Sy ste m、out、p r intln("输入年:");ye

17、ar=r ead、ne xt I nt();Sy ste m、o ut、pri n tln("输入月:");m ont h=read、 nextIn t ();cb、 setYe ar( year) ;cb、 setMo n t h( month) ;S tring a= cb、 getC alendar() ;/返回号码得一维数组oCha rArray() ;j a V a、class E u til 、 *char str=f or ( char c: s t r)Syst em、 ou" 日一二三四五六 " 、tt、printf( " %

18、3 c ", c)for(i nt i = 0;ia、lengt h; i+ )if( i7=0)Syste m、o ut、pr i ntln/ 输出数组 aSys t em、ou t、pnntf( "%4"”);/换行s",ai);class Ca lendarBean St r ing : day;in t yea r=0,mo nth=0;p ublic VO id Set Year (in t y ear) th 1s、y ea r =year;p ubli c V o 1 d setMonth( i n t month) this、 month

19、 =month;public S tr ing getCa lendar ()String a =new St r ing 42;C ale n dar r ili=Calend a r、ge tin st a n ce ();r ili、se t(yea r, month 1, 1);int we ek D a y=ri 1 i、ge t (Cal enda r、D AY OF_WE EK ) -1; /计算出 1 号得星1 nt da y= 0;1f (month=1 | mon month=1 2 )day=3 1;m onth =4| mont d ay =30;1 f(m o nth

20、=2) if(year%4=0) day =29;els eda y=28 ;iffoth= 3 |mo n t h=5 | |month=7 | | mon th = =8 | | mon t h=h=6 | | m ont h=9 | |mont h=11)&&( year% 100! =0 )| |( year% 40 0 = = 0 )r( in t i=0 ; 1 <w e ekDay ;1+ +) a1 = ”;"for(1 nt i=w eekD ay,n= 1; iweekDay+day; i+)ai=S tr 1 ng、val u eOf(n)

21、n+;fo r( in tetur=w eekDayday;ia、 length;i+ )= ”a;9、impo rtjava、util 、 *pubpu b l 1 c s ta tic voidScanner rea d=new Scanner( Syste m、1 n) ;int y ea r1,mont h 1,day1,y ea r2,m on th 2, day2 ;S ys tem、 out、 printl n (输入第一个日期得年、月、日(用空格或回车分隔) year1=read、 ne xtInt();mon th1=r ead、n ext Int() ;day1 =read

22、、 ne xt Int();Sy stem、 out、 println(" 输入第二个日期得年月日(用空格或回车分隔):”);lic cl a ss Em ain (St ri ng args ):");year2=reacd nex t I n t(); month2=read、n e xt I nt();day2 =read、n e xtInt();Calendar ca1endar =Ca le ndar、 getI nst ance() ; calen dar、 set( year1,mo nth1 1,day1);long time Ye arl =ca 1 en

23、d ar、g et TimeInMill is ();calenda r、 set(yea r2,mont h21,day 2) ;long t imeYear2 =ca le ndar、 get Ti meInMill i s();+mo n th1+"月” +d a y1 + "日与"+mo n th2+"月"+ da y2+"日相隔"+相隔天数+"long 相隔天数=Math、abs(timeYe a r1-time Y ea r 2 ) / ( 1 0 00* 6 0* 60* 2 4 ); S ystem

24、、 out、 print1 n("yearl +"年yea r2 +"年"1 0、11天) ;i m p ort j a va、ut l l、p u bl i c class E p u blic static v oid maind o uble a=0, b = 0 ,c = 0;a=12;b=24;c=Mat h、a sin(0、Sys te m、 out、 pri n c= M at h、 cos( 3、(Stri ng ar gs:)56) ;t ln(c);4);Sy stem、 out、pr i ntl n (c); xp(l) ;c= M

25、a th、eS y stem、out、plog (8);out、 prc=M ath、System、p u blic cl a ss Eint 1 n (c);ntln(c);n (String args )匚” a b123you您就是谁?"Sy Stem、ou12。impo rt java、 u pub lic c1 ass Epub1ic static void main(String args) String cost = "数学 87分,物理 76分,英语Scanne r scan ner = new S canne r(cost);u s eDeli m ite

26、r (":人 0 1 2 3 456 7 8 9、+");t il、*;96 分 "sca n n er、public s tatic void maSt ring strStri ng rege x = ”D+" ;s tr = s t r、r e p laceA ll (r egex, t、 pri nt ln (str);double s um=0;int count =0;try do u b l e scorew hile (scanner、h a sNext() s can ner、n extD ou b1 e( );cou nt +;Sum

27、=sum+ SCO r e ;7、System、o u t、pri n t 1 n(s c or e);t c h (Input Mismatch Ex cept ion ex p) St r ingt = s canner、next ();Sy stem、out、p r i n tln(”总分:"+sum +"分");Syste m、o ut、pr in t l n ("平均分:"+ sum/c ou nt+ ” 分");习题十(第1 0章)1。使用。2 按字节读取文件,按字符读取文件。3. 不可以。4. 使用对象流写入或读入对象时

28、,要保证对象就是序列化得。5. 使用对象流很容易得获取一个序列化对象得克隆,只需将该对象写入到对象输出流,那么 用对象输入流读回得对象一定就是原对象得一个克隆 .6.i mport java、i o、;pu b li c cl a ss E pu b lic s ta ti c vo id ma in(String a rgs)F ile("E、j ava”;);RandomAcc ess Rando mAccessFi le( f ,” rw”) ;se ek( 0);tr yrandom、(Char) C) ;c );s tr in g( c c);1 on g m =rando

29、m、len g th ();w hil e( m =0)m=m-1;random、 seek( m);int c =r a ndom、re adB y t e ();if( c <=255 && 0=0)Sy st e m、o ut、p r l nt e 1 se m=m -1;random、seek (m); byte cc=new byte 2 ;r a nd om、readFu lly(c System、out、p r int (newcatc h(Exception exp)importj ava io、*;public class E pub1 ic st at

30、l c void ma in(String Fi 1 e (”E、j ava");e ("temp、t xtl nOne= newarg s : ) FitryBufferedRe a der to ( tempFile);); (file);l nTwo =new Buff eredReade r(in One );Buff eredWr iter o ut= new BufferedWr i t er( to f ile);St ring s=n ull ; nt i=0 ;s=i n Two、 readL l ne(); whil e(s i+ ;ou t、!= nu

31、11 )OU t、write( i +" "+s); new Line ( );s= in T w o、read L ine();1 nOne、c lo s e(); in Two、 close();o ut、 f1u sh()o u t 、c1 ose);to();ca tch(IOExcept ione)8、属于上机操作题,解答略9、i m port jav a、io、im p ort j a va、ut l l、*pu b l l c c 1 a spu b lic st a t is E c vo id= newFi 1 e ("a、Sc anne do

32、u bl er sc = nu1s um= 0;ma in(St ri ng args) txt);l;tryt co u n t = 0; sc = new S canner(fi 1 e);sc、useD elimite r( ”$012345678 9、: wh ”) ;l le(sc、 hasNext() try d oub le price = sc、 nextD oub 1e ();e;sum = s umprlcSy stem、 o ut、 print 1 n (p rl ce );atc h (InputMismatch Excepti o n ex p) S tring t

33、= sc、n ex t( ) ;System、 OUt、 pri ntln(" 平均价格 :” sUm/c OUnt);c lass E c static vo id main(St ring args)puter f r=new p uter();cl assputer e xtends JTe xt Area text 1 , int count=1;double sum=0, a v put er( ) s etLayout (newJ Frame i mp lemen t s D o cume nt Listener text2;e r = 0;FlowLayo u t()

34、;teX t1= new JTeX tAre a(6,20);catch(E xcepti on eXp )S yst em、 out、 prin t1 n( eX p) ;第 11 章)1。F r am e容器得默认布局就是 Bo r derLayout布局。2不可以 .3。im port j a va、 awt、;import ja vax、 swing、 ev ent、 impo rt jav ax、 swing、;import ja va、aw t、even t、* p ub licpublitext2 = new JTextArea(6, 2 0);add(new JScrollPa

35、ne (t eX t1);add ( new J Scro 1 lPan e(tex t 2);te xt2、s et Edita ble(false);(te X t1、getDo c u m ent ()、a ddD oc u me nt Listen er(t his); setSize ( 30 0,3 2 0);set Vi sib1 e(tru e); vali da te();e Operat i on( J Frame、D IS P O SE _ON_ C L OSE);setDefaultC1 osp ub1icS tr i nv o idg s=te Xchan g e d

36、 Up date( Do cume ntEve nt e)t1、ge tT ext();St ri n gsum=0;a ve r=split(" A 0 1 2 34 5 6 7 89、+");0;le n gth; i + +)i=0; i< a、s um=s um+Dou b1 e、pa rse Doub1 e(ai) ;for( inttr y cat ch(E xcept ionee)a ver= sum/count ;tex t2、 setText( nu ll);t ex t2、a ppend(” n 与 :" +sum);text2、appe

37、nd (” n 平均值:"+aver);publi c voi d removeUpdate(Docume n tEvent e) c hang edUpda t e (e);(Do c umentEvent e) public v o id i nsertUp dat ec hangedU p d at e (e);4、imp ort j a va、aw t、i m port j a vax、 impor t importpja vax、 j a va、 ublic class E swin g、 event、 swing、 *; a wt、 eve nt、pub lic stat

38、ic void m ain p uterFr ame fr=new puterF(S tr in g arg s )r ame( );lasspu terFrame ex tends JFrame imp lemen t s ActionListen er xt F ield text1,tex t 2, t ext3;JBut to n but ton Add,button Su b,b uttonM u1, buttonDiv ; JL ab el label;public put er Fra me()s etL ay out (n ew Flow La yout ();te xt1 =

39、new JTextF ield(10) ;JTet e xt 2 = n ewJTextF l e 1te xt 3= n ew JTextFiel d label= n ew JLa bel("",d(10) ;(10 );JL abel、CENTER);label、setB ackground( C o 1 add( text 1);o r、g reen);add(labe1);add ( tex t2 ) ;ad d( t ext 3);butt onAdd=new JButton (加");but t onSub=new JB utt on("减

40、");乘” );除) ;buttonMul = new JB utt o n butto n D i v= n e w JButto nadd(but to nAdd );a dd(b ut tonSub); add( but ton Mul);ad d(but t onDi v);b utton A dd、a ddA ct ionLst ener (t his); e r(thi s );Listener(t hi s); b utton Div、a ddActio nListe ner(this) ; setSize(3 00, 320);buttonSub、addAc t io

41、nList enb u t tonMul、ad dA c tio nset Vi si ble(t ru e);validate( );se t Def ault Cl os eOp erat io n (JFram e、DIS POSE ON_C L OS E);p u b l ic vo id acti onP e r formed( A ction E vent e) d ou ble n;if( e、 getSource () =buttonAdd )doub le n1 , n2;try n1=Double、 pa rseDouble (text1 、 getTe x n2 =Dou

42、bl e、 pars eDo ubl e(te xt2、 n=n1+n 2 ;t ext3、 setTe xt(Str ing、 valueOf(n ); lab el、 set Text( +”);catc h(N umber FormatExce pt ion ee) text3、setText ("请输入数字字符”);else i f( e、 getSo urce( )= bu tto nSub)double n1,n2;( );g etTe xt( ) ) ;getTe xt ();n2=Double、 parse Do uble( tex t2、 n=n1n 2;text3

43、、 se tTex t(St ring、 value la bel、 setText ("-);c atch(Numb e rFo r matExceptio n ee) text3、setT ex t("请输入数字字符” g etTextO );Of(n) ) ;);tr y n1=Do uble、 parse Doub le(text1 、ge tTe X t ();el se if (e、 get S ource () = buttonM u l) d ouble n 1, n2;tr y n1=Double 、 parseD ouble( te xt1 、n2 =D

44、ou ble、p arseDo ub le(t ext2、g et Te xt ();n =n1 n2;te xt 3、set Tex t (Strin g、val u eO f (n); label、 setTe xt( ”);c atch(Num ber Fo r matEx c ep tion ee) t ex t3、 set Te xt (" 请输入数字字符 "); getSourceO = b u tto n Di v)1 ,n2 ;b le、parseDo uble (t ex t 1、ge tText ();double n try n1=Douelse if

45、( e、n 2 = Doubl e、p arseD ou b le (t e x t2、g etText (); n = n 1/ n 2;t ext 3、s etT e xt (St r ing、valueO f( n ); label、 set TeX t(/);cat ch (Num b er FormatE xc epti on ee) te X t3、va 1ida te();5、i m p o r tim p ort j av aim p ort j av aublic classja va、 awt、 awt、 event、 ;pu b lie s tx、 swing、 *;Ea

46、tic void m a i n( String args 口) s etTe x t (”请输入数字字符” );Win d o w win = new Wind ow ();win、 setT it le( "使用 MVC 结构” );win、setB ounds(1 0 0 ,100,420,2 60);s Win dow exte nds JFrame im p1 ements ActionListener L ader 1 ader ;/模型JTextField textAb ove,te xtB ot tom, textHeight;JT extA re a sh owAr

47、ea ;/ /视图JB utto n contr olBu t to n ;/控制器Wi n dow( )1n it();se tVisible ( tru e) ;setDefaultC 1la s/视图o seOper ati on( JF r am e、E XIT_ O N_C L O SE);v o id in 1 t()1 ader = newL ader ();e w JTex tField(5 );t ext Bott omtextAbo ve = ntextH e i g h tshowArea = ne w eontrolBut t on=new JT extFi eld (

48、5); new JT extFie 1 d (5 );JT extA re a(); ne w J Button ("计算面积");JP anel p No rth=new JPan el ();pNor t h、ad d (new J Labe 1("上底:");pN o rth 、a dd(textAb ov e);pNorth、add (n e w J L a b e 1(” 下底:”);pN or th、 ad d( textB ottom) ;pNor t h、ad d ( n ew JL abe 1( ” 高:");pNorth 、

49、 add( textHe ight);p No rth 、 add( controlBu t ton)con trolButt o n、a ddAc t1 on Listen er(thi s)add ( pN or t h , B order L a yo u t、NORTH);add (new JScro llPa n e( s howArea) , Bor d erLa yo ut、C ENT E R); p u b lic void act lo nPerfor med(ActionEve n t e) tr ydoub 1 e above = Dou b1 e、parseDouble

50、 (tex tAb o ve、getT ext ()、trim();dou b le bot tom = Double、p ar se D o ub 1e(t extB ot tom、getText ()、t rim( );double height = Dou ble、 parseDo ub le(t extHeight、getText()、 trim() ;1a d e r、 setAbov e(above);lade r、 setBottom (b ott om);la der、s et Height(h eight) ;doub1 e a rea = lader、 get Ar ea(

51、);showAre a、app end (”面积 :"+are a+” n” );ca tch (Ex cepti on e x)showA re a、a ppen d ( n”+ex+ ”n");l a ss L a d er doubl e a b o ve,b ott om , he igh t;p ub lic double ge t Ar ea ()doub 1 e a rea = (above+botto m) *h eight / 2、0;ret urn area ;v o id setAbo v e (dou bl e a) e = a;p ubli cab

52、 ovVO i d s etBotto m( double b) pub1 icbottom = b;pu b1 ic voi d setHeig ht( dou ble c )h eigh t = c;习题(第1 2章)1.4 种状态:新建、运行、中断与死亡。2. 有4种原因得中断:(1) JV M将C PU资源从当前线程切换给其她线程 ,使本线程让出 CPU得使用权处于中断状态。 线程使用CPU资源期间 执行了 sleep( int mills e con d) 方法,使当前线程进入休眠状态 .(3)线程使用CPU资源期间,执行了 wai t ()方法,使得当 前线程进入等待状态.(4)线

53、程使用C P U资源期间,执行某个操作进入阻塞状态, 比如执行 读/写操作引起阻塞。3。死亡状态,不能再调用start ()方法。4。新建与死亡状态。5。两种方法:用 Thr ead类或其子类.6 .使用se t P r or it y (in t g r a de )方法。7 .Jav a使我们可以创建多个线程,在处理多线程问题时,我们必须注意这样一个问题:当两个或多个线程同时访问同一个变量,并且一个线程需要修改这个变量.我们应对这样得问题作出处理 ,否则可能发生混乱。8。当一个线程使用得同步方法中用到某个变量,而此变量又需要其它线程修改后才能符合本notifyA 1 l线程得需要,那么可以在同步方法中使用w ait ()方法。使用wait方法可以中断方法得执行 使本线程等待,暂时让出CPU得使用权,并允许其它线程使用这个同步方法。其它线程如果 在使用这个同步方法时不需要等待,那么它使用完这个同步方法得同时,应当用 ()方法通知所有得由于使用这个同步方法而处于等待得

温馨提示

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

最新文档

评论

0/150

提交评论