forked from benjaminwhx/p_java8InAction
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApple.java
More file actions
47 lines (37 loc) · 832 Bytes
/
Apple.java
File metadata and controls
47 lines (37 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package entity;
/**
* User: 吴海旭
* Date: 2016-11-14
* Time: 上午11:00
*/
public class Apple {
private Integer weight;
private String color;
public Apple(){}
public Apple(Integer weight) {
this.weight = weight;
}
public Apple(Integer weight, String color) {
this.weight = weight;
this.color = color;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Override
public String toString() {
return "Apple{" +
"weight=" + weight +
", color='" + color + '\'' +
'}';
}
}