-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItem.java
More file actions
31 lines (28 loc) · 770 Bytes
/
Copy pathItem.java
File metadata and controls
31 lines (28 loc) · 770 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
package studyjava;
import studyjava.AItem;
public class Item {
String name; //姓名
float price;
public static void main(String[] args) {
// studyjava.Item hpbottle = new studyjava.Item();
// hpbottle.name = "血瓶";
// hpbottle.price = 300f;
// studyjava.Item sword = new studyjava.Item();
// sword.name = "长剑";
// sword.price = 700f;
// studyjava.Item shoe = new studyjava.Item();
// shoe.name = "潮鞋";
// shoe.price = 511f;
AItem hhero = new AItem("护甲",400f,500);
System.out.println(hhero.price);
}
}
// class tem{
// String name;
// int price;
//
//public tem(){}
//
//public tem(String a,int b){
// name = a;
// price = b;}}