package ch01;
public class Order {
int orderId;
String buyerId;
String sellerId;
int productId;
String orderDate;
}
package ch01;
public class UserInfo {
String userId;
String userPassWord;
String userName;
String userAddress;
String phoneNumber;
}
package ch01;
public class MainTest1 {
public static void main(String[] args) {
Order order1 = new Order();
// 값을 입력하고 출력까지 해봅시다.
order1.orderId = 15;
order1.buyerId = "박민수";
order1.sellerId = "이진수";
order1.productId = 20;
order1.orderDate = "08.07";
System.out.println(order1.orderId);
System.out.println(order1.buyerId);
System.out.println(order1.sellerId);
System.out.println(order1.productId);
System.out.println(order1.orderDate);
System.out.println("========");
UserInfo userinfo = new UserInfo();
// 값을 입력하고 출력까지 해봅시다.
userinfo.userId = "Park";
userinfo.userPassWord = "eessaa";
userinfo.userName = "박민수";
userinfo.userAddress = "부산";
userinfo.phoneNumber = "010 1111 2222";
System.out.println(userinfo.userId);
System.out.println(userinfo.userPassWord);
System.out.println(userinfo.userName);
System.out.println(userinfo.userAddress);
System.out.println(userinfo.phoneNumber);
}
}
'Java > chapter2' 카테고리의 다른 글
ch02 FormainTest1 (0) | 2021.08.25 |
---|---|
ch02 Student 메서드 (0) | 2021.08.23 |
ch01 FunctionTest (0) | 2021.08.23 |
ch01 Warrior (0) | 2021.08.23 |
ch01 Student (0) | 2021.08.23 |