201771010101 白玛次仁《面向对象程序设计(Java)》第十一周学习总结
实验十一 集合
实验时间 2018-11-8
1、实验目的与要求
(1) 掌握Vetor、Stack、Hashtable三个类的用途及常用API;
(2) 了解java集合框架体系组成;
(3) 掌握ArrayList、LinkList两个类的用途及常用API。
(4) 了解HashSet类、TreeSet类的用途及常用API。
(5)了解HashMap、TreeMap两个类的用途及常用API;
(6) 结对编程(Pair programming)练习,体验程序开发中的两人合作。
2、实验内容和步骤
实验1: 导入第9章示例程序,测试程序并进行代码注释。
测试程序1:
l 使用JDK命令运行编辑、运行以下三个示例程序,结合运行结果理解程序;
l 掌握Vetor、Stack、Hashtable三个类的用途及常用API。
//示例程序1 import java.util.Vector; class Cat { private int catNumber; Cat(int i) { catNumber = i; } void print() { System.out.println("Cat #" + catNumber); } } class Dog { private int dogNumber; Dog(int i) { dogNumber = i; } void print() { System.out.println("Dog #" + dogNumber); } } public class CatsAndDogs { public static void main(String[] args) { Vector cats = new Vector(); for (int i = 0; i < 7; i++) cats.addElement(new Cat(i)); cats.addElement(new Dog(7)); for (int i = 0; i < cats.size(); i++) ((Cat) cats.elementAt(i)).print(); } } |
//示例程序2 import java.util.*; public class Stacks { static String[] months = { "1", "2", "3", "4" }; public static void main(String[] args) { Stack stk = new Stack(); for (int i = 0; i < months.length; i++) stk.push(months[i]); System.out.println(stk); System.out.println("element 2=" + stk.elementAt(2)); while (!stk.empty()) System.out.println(stk.pop()); } } |
//示例程序3 import java.util.*; class Counter { int i = 1; public String toString() { return Integer.toString(i); } } public class Statistics { public static void main(String[] args) { Hashtable ht = new Hashtable(); for (int i = 0; i < 10000; i++) { Integer r = new Integer((int) (Math.random() * 20)); if (ht.containsKey(r)) ((Counter) ht.get(r)).i++; else ht.put(r, new Counter()); } System.out.println(ht); } } |
示例程序1
package demo;import java.util.Vector;class Cat {private int catNumber;Cat(int i) {catNumber = i;}void print() {System.out.println("Cat #" + catNumber);}
}class Dog {private int dogNumber;Dog(int i) {dogNumber = i;}void print() {System.out.println("Dog #" + dogNumber);}
}public class CatsAndDogs {public static void main(String[] args) {Vector cats = new Vector();for (int i = 0; i < 7; i++)cats.addElement(new Cat(i));cats.addElement(new Dog(7));for (int i = 0; i < 7; i++)((Cat) cats.elementAt(i)).print();((Dog) cats.elementAt(7)).print();}
}
import java.util.*;public class Stacks {static String[] months = { "1", "2", "3", "4" };public static void main(String[] args) {Stack stk = new Stack();for (int i = 0; i < months.length; i++)stk.push(months[i]);System.out.println(stk);System.out.println("element 2=" + stk.elementAt(2));while (!stk.empty())System.out.println(stk.pop());}}
package demo;import java.util.*;class Counter {int i = 1;//default:public String toString() {return Integer.toString(i);}
}public class Statistics {public static void main(String[] args) {Hashtable ht = new Hashtable();for (int i = 0; i < 10000; i++) {Integer r = new Integer((int) (Math.random() * 20));//用Math.random()if (ht.containsKey(r))((Counter) ht.get(r)).i++;elseht.put(r, new Counter());//输出r中数据的键值对出现的次数}System.out.println(ht);}
}
测试程序2
import java.util.*; public class ArrayListDemo { public static void main(String[] argv) { ArrayList al = new ArrayList(); // Add lots of elements to the ArrayList... al.add(new Integer(11)); al.add(new Integer(12)); al.add(new Integer(13)); al.add(new String("hello")); // First print them out using a for loop. System.out.println("Retrieving by index:"); for (int i = 0; i < al.size(); i++) { System.out.println("Element " + i + " = " + al.get(i)); } } } |
import java.util.*; public class LinkedListDemo { public static void main(String[] argv) { LinkedList l = new LinkedList(); l.add(new Object()); l.add("Hello"); l.add("zhangsan"); ListIterator li = l.listIterator(0); while (li.hasNext()) System.out.println(li.next()); if (l.indexOf("Hello") < 0) System.err.println("Lookup does not work"); else System.err.println("Lookup works"); } } |
import java.util.*;public class ArrayListDemo//ArrayList使用了数组的实现
{public static void main(String[] argv) {ArrayList al = new ArrayList();//在ArrayList中添加大量元素al.add(new Integer(11));al.add(new Integer(12));al.add(new Integer(13));al.add(new String("hello"));//下标从0开始,添加4个元素// First print them out using a for loop.System.out.println("Retrieving by index:");for (int i = 0; i < al.size(); i++) {System.out.println("Element " + i + " = " + al.get(i));}}
}
l 在Elipse环境下编辑运行调试教材360页程序9-1,结合程序运行结果理解程序;
l 掌握ArrayList、LinkList两个类的用途及常用API。
Arraylist:
package linkedList;import java.util.*;/*** This program demonstrates operations on linked lists.* @version 1.11 2012-01-26* @author Cay Horstmann*/
public class LinkedListTest
{public static void main(String[] args){List<String> a = new LinkedList<>();a.add("Amy");a.add("Carl");a.add("Erica");List<String> b = new LinkedList<>();b.add("Bob");b.add("Doug");b.add("Frances");b.add("Gloria");// merge the words from b into aListIterator<String> aIter = a.listIterator();Iterator<String> bIter = b.iterator();while (bIter.hasNext()){if (aIter.hasNext()) aIter.next();aIter.add(bIter.next());}System.out.println(a);// remove every second word from bbIter = b.iterator();while (bIter.hasNext()){bIter.next(); // skip one elementif (bIter.hasNext()){bIter.next(); // skip next elementbIter.remove(); // remove that element}}System.out.println(b);// bulk operation: remove all words in b from aa.removeAll(b);System.out.println(a);}
}
测试程序3:
l 运行SetDemo程序,结合运行结果理解程序;
import java.util.*; public class SetDemo { public static void main(String[] argv) { HashSet h = new HashSet(); //也可以 Set h=new HashSet() h.add("One"); h.add("Two"); h.add("One"); // DUPLICATE h.add("Three"); Iterator it = h.iterator(); while (it.hasNext()) { System.out.println(it.next()); } } } |
l 在Elipse环境下调试教材365页程序9-2,结合运行结果理解程序;了解HashSet类的用途及常用API。
package set;
import java.util.*;/*** This program uses a set to print all unique words in System.in.* @version 1.12 2015-06-21* @author Cay Horstmann*/
public class SetTest
{public static void main(String[] args){Set<String> words = new HashSet<>(); // HashSet implements Setlong totalTime = 0;try (Scanner in = new Scanner(System.in)){while (in.hasNext()){String word = in.next();long callTime = System.currentTimeMillis();words.add(word);callTime = System.currentTimeMillis() - callTime;totalTime += callTime;}}Iterator<String> iter = words.iterator();for (int i = 1; i <= 20 && iter.hasNext(); i++)System.out.println(iter.next());System.out.println(". . .");System.out.println(words.size() + " distinct words. " + totalTime + " milliseconds.");}
}
l 在Elipse环境下调试教材367页-368程序9-3、9-4,结合程序运行结果理解程序;了解TreeSet类的用途及常用API。
package treeSet;import java.util.*;/*** An item with a description and a part number.*/ public class Item implements Comparable<Item> {private String description;private int partNumber;/*** Constructs an item.* * @param aDescription* the item's description* @param aPartNumber* the item's part number*/public Item(String aDescription, int aPartNumber){description = aDescription;partNumber = aPartNumber;}/*** Gets the description of this item.* * @return the description*/public String getDescription(){return description;}public String toString(){return "[description=" + description + ", partNumber=" + partNumber + "]";}public boolean equals(Object otherObject){if (this == otherObject) return true;if (otherObject == null) return false;if (getClass() != otherObject.getClass()) return false;Item other = (Item) otherObject;return Objects.equals(description, other.description) && partNumber == other.partNumber;}public int hashCode(){return Objects.hash(description, partNumber);}public int compareTo(Item other){int diff = Integer.compare(partNumber, other.partNumber);return diff != 0 ? diff : description.compareTo(other.description);} }
package treeSet;import java.util.*;/*** This program sorts a set of item by comparing their descriptions.* @version 1.12 2015-06-21* @author Cay Horstmann*/
public class TreeSetTest
{public static void main(String[] args){SortedSet<Item> parts = new TreeSet<>();parts.add(new Item("Toaster", 1234));parts.add(new Item("Widget", 4562));parts.add(new Item("Modem", 9912));System.out.println(parts);NavigableSet<Item> sortByDescription = new TreeSet<>(Comparator.comparing(Item::getDescription));sortByDescription.addAll(parts);System.out.println(sortByDescription);}
}
测试程序4:
l 使用JDK命令运行HashMapDemo程序,结合程序运行结果理解程序;
import java.util.*; public class HashMapDemo { public static void main(String[] argv) { HashMap h = new HashMap(); // The hash maps from company name to address. h.put("Adobe", "Mountain View, CA"); h.put("IBM", "White Plains, NY"); h.put("Sun", "Mountain View, CA"); String queryString = "Adobe"; String resultString = (String)h.get(queryString); System.out.println("They are located in: " + resultString); } } |
l 在Elipse环境下调试教材373页程序9-6,结合程序运行结果理解程序;
l 了解HashMap、TreeMap两个类的用途及常用API。
package map;import java.util.*;/*** This program demonstrates the use of a map with key type String and value type Employee.* @version 1.12 2015-06-21* @author Cay Horstmann*/
public class MapTest
{public static void main(String[] args){Map<String, Employee> staff = new HashMap<>();staff.put("144-25-5464", new Employee("Amy Lee"));staff.put("567-24-2546", new Employee("Harry Hacker"));staff.put("157-62-7935", new Employee("Gary Cooper"));staff.put("456-62-5527", new Employee("Francesca Cruz"));// print all entriesSystem.out.println(staff);// remove an entrystaff.remove("567-24-2546");// replace an entrystaff.put("456-62-5527", new Employee("Francesca Miller"));// look up a valueSystem.out.println(staff.get("157-62-7935"));// iterate through all entriesstaff.forEach((k, v) -> System.out.println("key=" + k + ", value=" + v));}
}
package map;import java.util.*;/*** This program demonstrates the use of a map with key type String and value type Employee.* @version 1.12 2015-06-21* @author Cay Horstmann*/
public class MapTest
{public static void main(String[] args){Map<String, Employee> staff = new HashMap<>();staff.put("144-25-5464", new Employee("Amy Lee"));staff.put("567-24-2546", new Employee("Harry Hacker"));staff.put("157-62-7935", new Employee("Gary Cooper"));staff.put("456-62-5527", new Employee("Francesca Cruz"));// print all entriesSystem.out.println(staff);// remove an entrystaff.remove("567-24-2546");// replace an entrystaff.put("456-62-5527", new Employee("Francesca Miller"));// look up a valueSystem.out.println(staff.get("157-62-7935"));// iterate through all entriesstaff.forEach((k, v) -> System.out.println("key=" + k + ", value=" + v));}
}
实验2:结对编程练习:
l 关于结对编程:以下图片是一个结对编程场景:两位学习伙伴坐在一起,面对着同一台显示器,使用着同一键盘,同一个鼠标,他们一起思考问题,一起分析问题,一起编写程序。
l 关于结对编程的阐述可参见以下链接:
http://www.cnblogs.com/xinz/archive/2011/08/07/2130332.html
http://en.wikipedia.org/wiki/Pair_programming
l 对于结对编程中代码设计规范的要求参考:
http://www.cnblogs.com/xinz/archive/2011/11/20/2255971.html
以下实验,就让我们来体验一下结对编程的魅力。
l 确定本次实验结对编程合作伙伴;
l 各自运行合作伙伴实验九编程练习1,结合使用体验对所运行程序提出完善建议;
穷吉
import java.io;2 import java.io.File;3 import java.io.FileInputStream;4 import java.io.FileNotFoundException;5 import java.io.IOException;6 import java.io.InputStreamReader;7 import java.util.ArrayList;8 import java.util.Arrays;9 import java.util.Collections;10 import java.util.Scanner;11 12 public class Test{13 private static ArrayList<Student> studentlist;14 public static void main(String[] args) {15 studentlist = new ArrayList<>();16 Scanner scanner = new Scanner(System.in);17 File file = new File("C:\\下载\\身份证号.txt");18 try {19 FileInputStream fis = new FileInputStream(file);20 BufferedReader in = new BufferedReader(new InputStreamReader(fis));21 String temp = null;22 while ((temp = in.readLine()) != null) {23 24 Scanner linescanner = new Scanner(temp);25 26 linescanner.useDelimiter(" "); 27 String name = linescanner.next();28 String number = linescanner.next();29 String sex = linescanner.next();30 String age = linescanner.next();31 String province =linescanner.nextLine();32 Student student = new Student();33 student.setName(name);34 student.setnumber(number);35 student.setsex(sex);36 int a = Integer.parseInt(age);37 student.setage(a);38 student.setprovince(province);39 studentlist.add(student);40 41 }42 } catch (FileNotFoundException e) {43 System.out.println("学生信息文件找不到");44 e.printStackTrace();45 } catch (IOException e) {46 System.out.println("学生信息文件读取错误");47 e.printStackTrace();48 }49 boolean isTrue = true;50 while (isTrue) {51 System.out.println("选择你的操作,输入正确格式的选项");52 System.out.println("1.按姓名字典序输出人员信息");53 System.out.println("2.输出年龄最大和年龄最小的人");54 System.out.println("3.查找老乡");55 System.out.println("4.查找年龄相近的人");56 System.out.println("5.退出");57 String m = scanner.next();58 switch (m) {59 case "1":60 Collections.sort(studentlist); 61 System.out.println(studentlist.toString());62 break;63 case "2":64 int max=0,min=100;65 int j,k1 = 0,k2=0;66 for(int i=1;i<studentlist.size();i++)67 {68 j=studentlist.get(i).getage();69 if(j>max)70 {71 max=j; 72 k1=i;73 }74 if(j<min)75 {76 min=j; 77 k2=i;78 }79 80 } 81 System.out.println("年龄最大:"+studentlist.get(k1));82 System.out.println("年龄最小:"+studentlist.get(k2));83 break;84 case "3":85 System.out.println("输入省份");86 String find = scanner.next(); 87 String place=find.substring(0,3);88 for (int i = 0; i <studentlist.size(); i++) 89 {90 if(studentlist.get(i).getprovince().substring(1,4).equals(place)) 91 System.out.println("老乡"+studentlist.get(i));92 } 93 break;94 95 case "4":96 System.out.println("年龄:");97 int yourage = scanner.nextInt();98 int near=agenear(yourage);99 int value=yourage-studentlist.get(near).getage();
100 System.out.println(""+studentlist.get(near));
101 break;
102 case "5":
103 isTrue = false;
104 System.out.println("退出程序!");
105 break;
106 default:
107 System.out.println("输入有误");
108
109 }
110 }
111 }
112 public static int agenear(int age) {
113 int j=0,min=53,value=0,k=0;
114 for (int i = 0; i < studentlist.size(); i++)
115 {
116 value=studentlist.get(i).getage()-age;
117 if(value<0) value=-value;
118 if (value<min)
119 {
120 min=value;
121 k=i;
122 }
123 }
124 return k;
125 }
126
127 }
public class Student implements Comparable<Student> {2 3 private String name;4 private String number ;5 private String sex ;6 private int age;7 private String province;8 9 public String getName() {
10 return name;
11 }
12 public void setName(String name) {
13 this.name = name;
14 }
15 public String getnumber() {
16 return number;
17 }
18 public void setnumber(String number) {
19 this.number = number;
20 }
21 public String getsex() {
22 return sex ;
23 }
24 public void setsex(String sex ) {
25 this.sex =sex ;
26 }
27 public int getage() {
28
29 return age;
30 }
31 public void setage(int age) {
32 // int a = Integer.parseInt(age);
33 this.age= age;
34 }
35
36 public String getprovince() {
37 return province;
38 }
39 public void setprovince(String province) {
40 this.province=province ;
41 }
42
43 public int compareTo(Student o) {
44 return this.name.compareTo(o.getName());
45 }
46
47 public String toString() {
48 return name+"\t"+sex+"\t"+age+"\t"+number+"\t"+province+"\n";
49 }
50 }
l 各自运行合作伙伴实验十编程练习2,结合使用体验对所运行程序提出完善建议;
穷吉
package 运算;import java.util.Scanner;public class Demo {public static void main(String[] args) {// 用户的答案要从键盘输入,因此需要一个键盘输入流
@SuppressWarnings("resource")Scanner in = new Scanner(System.in);// 定义一个变量用来统计得分
int sum = 0;// 通过循环生成10道题
for (int i = 0; i < 10; i++) {// 随机生成两个10以内的随机数作为被除数和除数
int a = (int) Math.round(Math.random() * 10);int b = (int) Math.round(Math.random() * 10);System.out.println(a + "/" + b + "=");// 定义一个整数用来接收用户输入的答案
int c = in.nextInt();// 判断用户输入的答案是否正确,正确给10分,错误不给分
if (c == a / b) {sum += 10;System.out.println("恭喜答案正确");}
else {System.out.println("抱歉,答案错误");}}//输出用户的成绩
System.out.println("你的得分为"+sum);}
}package 运算;public class Yuns {public int add(int a,int b){return a+b;}public int reduce(int a,int b){if((a-b)>0)return a-b;else return 0;}public int multiply(int a,int b){return a*b;}public int devision(int a,int b){if(b!=0)return a/b;else return 0;}
l 采用结对编程方式,与学习伙伴合作完成实验九编程练习1;
import java.io;2 import java.io.File;3 import java.io.FileInputStream;4 import java.io.FileNotFoundException;5 import java.io.IOException;6 import java.io.InputStreamReader;7 import java.util.ArrayList;8 import java.util.Arrays;9 import java.util.Collections;10 import java.util.Scanner;11 12 public class Test{13 private static ArrayList<Student> studentlist;14 public static void main(String[] args) {15 studentlist = new ArrayList<>();16 Scanner scanner = new Scanner(System.in);17 File file = new File("C:\\下载\\身份证号.txt");18 try {19 FileInputStream fis = new FileInputStream(file);20 BufferedReader in = new BufferedReader(new InputStreamReader(fis));21 String temp = null;22 while ((temp = in.readLine()) != null) {23 24 Scanner linescanner = new Scanner(temp);25 26 linescanner.useDelimiter(" "); 27 String name = linescanner.next();28 String number = linescanner.next();29 String sex = linescanner.next();30 String age = linescanner.next();31 String province =linescanner.nextLine();32 Student student = new Student();33 student.setName(name);34 student.setnumber(number);35 student.setsex(sex);36 int a = Integer.parseInt(age);37 student.setage(a);38 student.setprovince(province);39 studentlist.add(student);40 41 }42 } catch (FileNotFoundException e) {43 System.out.println("学生信息文件找不到");44 e.printStackTrace();45 } catch (IOException e) {46 System.out.println("学生信息文件读取错误");47 e.printStackTrace();48 }49 boolean isTrue = true;50 while (isTrue) {51 System.out.println("选择你的操作,输入正确格式的选项");52 System.out.println("1.按姓名字典序输出人员信息");53 System.out.println("2.输出年龄最大和年龄最小的人");54 System.out.println("3.查找老乡");55 System.out.println("4.查找年龄相近的人");56 System.out.println("5.退出");57 String m = scanner.next();58 switch (m) {59 case "1":60 Collections.sort(studentlist); 61 System.out.println(studentlist.toString());62 break;63 case "2":64 int max=0,min=100;65 int j,k1 = 0,k2=0;66 for(int i=1;i<studentlist.size();i++)67 {68 j=studentlist.get(i).getage();69 if(j>max)70 {71 max=j; 72 k1=i;73 }74 if(j<min)75 {76 min=j; 77 k2=i;78 }79 80 } 81 System.out.println("年龄最大:"+studentlist.get(k1));82 System.out.println("年龄最小:"+studentlist.get(k2));83 break;84 case "3":85 System.out.println("输入省份");86 String find = scanner.next(); 87 String place=find.substring(0,3);88 for (int i = 0; i <studentlist.size(); i++) 89 {90 if(studentlist.get(i).getprovince().substring(1,4).equals(place)) 91 System.out.println("老乡"+studentlist.get(i));92 } 93 break;94 95 case "4":96 System.out.println("年龄:");97 int yourage = scanner.nextInt();98 int near=agenear(yourage);99 int value=yourage-studentlist.get(near).getage();
100 System.out.println(""+studentlist.get(near));
101 break;
102 case "5":
103 isTrue = false;
104 System.out.println("退出程序!");
105 break;
106 default:
107 System.out.println("输入有误");
108
109 }
110 }
111 }
112 public static int agenear(int age) {
113 int j=0,min=53,value=0,k=0;
114 for (int i = 0; i < studentlist.size(); i++)
115 {
116 value=studentlist.get(i).getage()-age;
117 if(value<0) value=-value;
118 if (value<min)
119 {
120 min=value;
121 k=i;
122 }
123 }
124 return k;
125 }
126
127 }
public class Student implements Comparable<Student> {2 3 private String name;4 private String number ;5 private String sex ;6 private int age;7 private String province;8 9 public String getName() {
10 return name;
11 }
12 public void setName(String name) {
13 this.name = name;
14 }
15 public String getnumber() {
16 return number;
17 }
18 public void setnumber(String number) {
19 this.number = number;
20 }
21 public String getsex() {
22 return sex ;
23 }
24 public void setsex(String sex ) {
25 this.sex =sex ;
26 }
27 public int getage() {
28
29 return age;
30 }
31 public void setage(int age) {
32 // int a = Integer.parseInt(age);
33 this.age= age;
34 }
35
36 public String getprovince() {
37 return province;
38 }
39 public void setprovince(String province) {
40 this.province=province ;
41 }
42
43 public int compareTo(Student o) {
44 return this.name.compareTo(o.getName());
45 }
46
47 public String toString() {
48 return name+"\t"+sex+"\t"+age+"\t"+number+"\t"+province+"\n";
49 }
50 }
l 采用结对编程方式,与学习伙伴合作完成实验十编程练习2。
package 运算;import java.util.Scanner;public class Demo {public static void main(String[] args) {// 用户的答案要从键盘输入,因此需要一个键盘输入流
@SuppressWarnings("resource")Scanner in = new Scanner(System.in);// 定义一个变量用来统计得分
int sum = 0;// 通过循环生成10道题
for (int i = 0; i < 10; i++) {// 随机生成两个10以内的随机数作为被除数和除数
int a = (int) Math.round(Math.random() * 10);int b = (int) Math.round(Math.random() * 10);System.out.println(a + "/" + b + "=");// 定义一个整数用来接收用户输入的答案
int c = in.nextInt();// 判断用户输入的答案是否正确,正确给10分,错误不给分
if (c == a / b) {sum += 10;System.out.println("恭喜答案正确");}
else {System.out.println("抱歉,答案错误");}}//输出用户的成绩
System.out.println("你的得分为"+sum);}
}package 运算;public class Yuns {public int add(int a,int b){return a+b;}public int reduce(int a,int b){if((a-b)>0)return a-b;else return 0;}public int multiply(int a,int b){return a*b;}public int devision(int a,int b){if(b!=0)return a/b;else return 0;
}
学习总结:通过本周的学习,更懂得了Java的更多知识,也通过同学一起做一个实验时,更快地解决了自己没了解到的内容。
转载于:https://www.cnblogs.com/baimaciren/p/9930800.html
201771010101 白玛次仁《面向对象程序设计(Java)》第十一周学习总结相关推荐
- 201871010115——马北《面向对象程序设计JAVA》第二周学习总结
项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p ...
- 201621123080《Java程序设计》第十一周学习总结
201621123080<Java程序设计>第十一周学习总结 1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多线程相关内容. 2. 书面作业 本次PTA作业题集多线程 ...
- 《数据结构与面向对象程序设计》第1周学习总结
20182316胡泊 2019-2020-1 <数据结构与面向对象程序设计>第1周学习总结 教材学习内容总结 简单java程序是有哪些部分组成的 Java程序好的排版布局是怎样的 程序开发 ...
- 《Java程序设计》第十一周学习总结
20175334 <Java程序设计>第十一周学习总结 教材学习内容总结 第十三章 URL类 一个URL对象通常包含最基本的三部分信息:协议.地址.资源. URL对象调用 InputStr ...
- 20175227张雪莹 2018-2019-2 《Java程序设计》第十一周学习总结
20175227张雪莹 2018-2019-2 <Java程序设计>第十一周学习总结 教材学习内容总结 第十三章 Java网络编程 URL类 一个URL对象通常包含最基本的三部分信息:协议 ...
- 20175208 《Java程序设计》第十一周学习总结
20175208张家华第十一周学习总结 教材学习内容总结 第十三章java网络编程: 主要内容: URL类 InetAdress类 套接字 UDP数据报 广播数据报 Java远程调用(RMI) 1.U ...
- 201771010101 白玛次仁 《2018面向对象程序设计(Java)》第七周学习总结
实验七 继承附加实验 实验时间 2018-10-11 1. 继承的概念: 继承在本职上是特殊--一般的关系,即常说的is-a关系.子类继承父类,表明子类是一种特殊的父类,并且具有父类所不具有的一些属性 ...
- 201771010101 白玛次仁 《2018面向对象程序设计(Java)》第十周学习总结
实验十 泛型程序设计技术 实验时间 2018-11-1 学习总结 泛型:也称参数化类型(parameterized type),就是在定义类.接口和方法时,通过类型参数指示将要处理的对象类型.(如A ...
- 201771010101 白玛次仁
本人学号<面向对象程序设计(java)>第一周学习总结 第一部分:课程准备部分 填写课程学习 平台注册账号, 平台名称 注册账号 博客园:www.cnblogs.com 程序设计评测:ht ...
- 实验四 201771010101 白玛次仁
实验四 类与对象的定义及 第一部分:理论部分 Java类库中的LocalDate类位于Java.Time包中 1.用户自定义类: 2.静态域与静态方法: 3.方法参数 4.对象构造 5.包 6.类路径 ...
最新文章
- Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换
- 深入理解 Spring 之源码剖析IOC
- 爱数的诗和远方:云端数据运营服务
- 如何破解无线路由器密码,如何破解WEP密码,破解无线路由器
- 游戏基础体验研究:玩家想要什么样的美术品质?
- 2020\Simulation_1\5.数位递增的数
- NeurIPS 2020 | 没有乘法的神经网络,照样起飞?
- while用法_语法宝典:连词while的四种用法,你都学会了吗?
- 手把手教你用Python的NumPy包处理数据
- python中stacked_python – Django管理员StackedInline定制
- 元旦海报设计素材|节日气氛PNG元素,满满中国风
- 64位和32位的区别
- 几种主流热修复方案分析
- 训练loss不下降原因总结
- pycharm没有python interpreter_pycharm无法设置interpreter?
- 软件单元黑盒测试,软件测试教学资源单元3 黑盒测试.doc
- java dispose事件_求助!!为什么我的dispose()不起作用
- 什么是WINSXS文件夹
- 程序卡住了?教你如何调试已在运行的程序
- 支撑小米万亿级的消息队列架构与实践
热门文章
- 来来来!Java这些高端技术只有你还不知道
- 【2021Java最新学习路线】java后端开发入门
- 第 5 章 虚拟机栈
- JavaScript高级使用(一)--参数Arguments对象
- 961计算机组成原理,2017年华中科技大学附属协和医院961计算机组成原理考研强化模拟题...
- sap客户主数据bapi_【SD系列】SAP SD模块-创建供应商主数据BAPI
- pycharm安装怎么选_安装新风系统,地送风和顶送风哪种?专业师傅分析,不纠结怎么选...
- oracle怎么装系统,【Oracle安装与操作系统用户组】
- php 接收传值_php接受post传值的方法
- 山东自考c语言程序设计停考了吗,山东省自考教育类停考专业遗留问题的通知...