freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[理學(xué)]java第二版課后作業(yè)答案(編輯修改稿)

2025-02-05 00:32 本頁面
 

【文章內(nèi)容簡介】 for(int i=0。i星期幾 。i++) { a[i]=**。 } for(int i=星期幾 ,n=1。i星期幾 +31。i++) { if(n=9) a[i]=(n)+ 。 else a[i]=(n) 。 n++。 } for(int i=0。i。i++) { if(i%7==0) { ()。 } ( +a[i])。 } } } 2. class ZuoYe7_2 { public static void main(String args[]) { int year1,month1,day1,year2,month2,day2。 try { year1=(args[0])。 month1=(args[1])。 day1=(args[2])。 year2=(args[3])。 month2=(args[4])。 day2=(args[5])。 } catch(NumberFormatException e) { year1=2022。 month1=0。 day1=1。 year2=2022。 month2=0。 day2=1。 } Calendar calendar=()。 (year1,month1,day1)。 long timeYear1=()。 (year2,month2,day2)。 long timeYear2=()。 long 相隔天數(shù) =((timeYear1timeYear2)/(1000*60*60*24))。 (+year1+年 +month1+月 +day1+日和 + year2+年 +month2+月 +day2+日相隔 +相隔天數(shù) +天 )。 } } 3. import .*。 public class ZuoYe4_1{ public static void main(String args[]){ BigInteger chengji=new BigInteger(1), ONE=new BigInteger(1), i=ONE, m=new BigInteger(10)。 while((m)=0){ chengji=(i)。 i=(ONE)。 } (chengji)。 } } 4. import .*。 public class ZuoYe7_4{ public static void main(String args[]){ HashSetInteger A=new HashSetInteger(), B=new HashSetInteger(), tempSet=new HashSetInteger()。 (new Integer(1))。 (new Integer(2))。 (new Integer(3))。 (new Integer(4))。 (new Integer(1))。 (new Integer(3))。 (new Integer(7))。 (new Integer(9))。 (new Integer(11))。 tempSet=(HashSetInteger)()。 (B)。 (交: )。 IteratorInteger iter=()。 while(()){ Integer te=()。 (%d, ,())。 } tempSet=(HashSetInteger)()。 (B)。 iter=()。 (并: )。 while(()){ Integer te=()。 (%d, ,())。 } tempSet=(HashSetInteger)()。 (B)。 (差: )。 iter=()。 while(()){ Integer te=()。 (%d, ,())。 } } } 5. import .*。 class MyKey implements Comparable{ double number=0。 MyKey(double number){ =number。 } public int pareTo(Object b){ MyKey st=(MyKey)b。 if(()==0){ return 1。 } else{ return (int)(()*1000)。 } } } class 硬盤 { int size。 double price。 硬盤 (int n, double p){ size=n。 price=p。 } } public class ZuoYe4_1{ public static void main(String args[ ]){ int [] size={10,3,7,12,10,22,100,4,6,2}。 double [] price={,,,}。 硬盤 [] s=new 硬盤 [10]。 for(int i=0。i。i++) s[i]=new 硬盤 (size[i],price[i])。 TreeMapMyKey,硬盤 treemap=new TreeMapMyKey,硬盤 ()。 for(int i=0。i。i++) (new MyKey(s[i].size),s[i])。 int number=()。 (樹映射中有 +number+個對象 :)。 Collection硬盤 collection=()。 Iterator硬盤 iter=()。 while(()){ 硬盤 te=()。 (+,+)。 } ()。 for(int i=0。i。i++) (new MyKey(s[i].price),s[i])。 number=()。 (樹映射中有 +number+個對象 :)。 collection=()。 iter=()。 while(()){ 硬盤 te=()。 (+,+)。 } } } 第八章 作業(yè)題 1. 屬于操作 題目,省略 2. 參見例子 82 3. 參見例子 83 4. 參見例子 810 第九章 作業(yè)題 1. import .*。 import .*。 import .*。 public class ZuoYe9_1 { public static void main(String args[]) { int b。 byte tom[]=new byte[25]。 try{ File f=new File()。 FileInputStream in=new FileInputStream(f)。 while((b=(tom,0,25))!=1) { String s=new String (tom,0,b)。 (s)。 } ()。 } catch(IOException e) { (File read Error+e)。 } } } 2. import .*。 import .*。 public class ZuoYe9_2{ public static void main(String args[]){ Scanner reader=new Scanner()。 int b。 try{ FileOutputStream writefile=new FileOutputStream()。 int line=1,n=10。 (輸入 +n+行文本,并存入磁盤: )。 while(line=n){ String s=()。 byte buffer[]=()。 (buffer,0,)。 line++。 } ()。 } catch(IOException e){ (Error +e)。 } } } 3. import .*。 public class ZuoYe9_3{ public static void main(String args[ ]){ int n=1。 CharArrayWriter out=new CharArrayWriter()。 for(char c=39。а39。c=39。я39。c++){ (c)。 } CharArrayReader in=new CharArrayReader(())。 try{ while((n=())!=1){ if(n%2==0){ (\n)。 } (\t 位置 %d,字符 \39。%c\39。,n,(char)n)。 } } catch(IOException e){} } } 4. import .*。 import .*。 public class ZuoYe9_4{ public static void main(String args[]){ try{ FileOutputStream f
點擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1