• 大小: 231KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-25
  • 语言: Java
  • 标签: Java  习题答案  

资源简介

学习编程最重要的还是要靠自己动手做练习,此文档是Java语言程序设计(梁勇)一书第21-30章完整的习题答案,可以很好地帮助我们学习提高!

资源截图

代码片段和文件信息

import java.util.*;

public class Exercise21_01 {
  public static void main(String[] args) {
    linkedHashSet set1 = new linkedHashSet(Arrays.asList(
      new String[]{“George“ “Jim“ “John“ “Blake“ “Kevin“ “Michael“}));

    linkedHashSet set1Clone1 = (linkedHashSet)set1.clone();
    linkedHashSet set1Clone2 = (linkedHashSet)set1.clone();

    linkedHashSet set2 = new linkedHashSet(Arrays.asList(
      new String[] {“George“ “Katie“ “Kevin“ “Michelle“ “Ryan“}));

    set1.addAll(set2);
    set1Clone1.removeAll(set2);
    set1Clone2.retainAll(set2);

    System.out.println(“The union of the two sets is “ + set1);
    System.out.println(“The difference of the two sets is “ + set1Clone1);
    System.out.println(“The intersection of the two sets is “ + set1Clone2);
  }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       9549  2013-05-15 16:52  chapter24\Exercise24_01.java

     文件      10292  2013-05-15 16:52  chapter24\Exercise24_02.java

     文件       8547  2013-05-15 16:52  chapter24\Exercise24_03.java

     文件       1837  2013-05-15 16:52  chapter24\Exercise24_04.java

     文件        608  2013-05-15 16:52  chapter24\Exercise24_05.java

     文件        983  2013-05-15 16:52  chapter24\Exercise24_06.java

     文件       5626  2013-07-25 06:56  chapter24\Exercise24_07.java

     文件      10881  2013-07-25 06:56  chapter24\Exercise24_08.java

     文件      14509  2013-07-25 06:56  chapter24\Exercise24_09.java

     文件       3188  2013-07-25 06:56  chapter24\Exercise24_10.java

     文件       7857  2013-07-25 06:56  chapter24\Exercise24_11.java

     文件       3286  2013-07-25 06:56  chapter24\Exercise24_12.java

     文件        943  2013-05-15 16:52  chapter24\Exercise24_13.java

     文件       1169  2013-05-15 16:52  chapter24\Exercise24_14.java

     文件      11605  2013-05-15 16:52  chapter25\Exercise25_01.java

     文件       4145  2013-09-11 18:57  chapter25\Exercise25_01Extra.java

     文件       4748  2013-09-11 20:59  chapter25\Exercise25_02Extra.java

     文件       9487  2013-05-15 16:52  chapter25\Exercise25_03.java

     文件       5443  2013-09-11 21:27  chapter25\Exercise25_03Extra.java

     文件       9675  2013-05-15 16:52  chapter25\Exercise25_04.java

     文件       9648  2013-05-15 16:52  chapter25\Exercise25_05.java

     文件      10439  2013-05-15 16:52  chapter25\Exercise25_06.java

     文件       7750  2013-05-15 16:52  chapter25\Exercise25_07.java

     文件       9507  2013-05-22 21:24  chapter25\Exercise25_08.java

     文件       9990  2013-05-22 19:57  chapter25\Exercise25_09.java

     文件      10040  2013-05-22 21:24  chapter25\Exercise25_10.java

     文件       4154  2013-07-25 06:56  chapter25\Exercise25_11.java

     文件        941  2013-05-23 09:12  chapter25\Exercise25_12.java

     文件      14810  2013-07-25 06:56  chapter25\Exercise25_13.java

     文件       3345  2013-05-15 16:52  chapter25\Exercise25_14.java

............此处省略143个文件信息

评论

共有 条评论