-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain
25 lines (21 loc) · 806 Bytes
/
main
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
import javax.swing.plaf.synth.SynthOptionPaneUI;
import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("nhập vào các giá trị: ");
System.out.println("ItemId: ");
int itemID = scanner.nextInt();
scanner.nextLine();
System.out.println("name: ");
String name = scanner.nextLine();
System.out.println("producer: ");
String producer = scanner.nextLine();
System.out.println("price: ");
double price = scanner.nextDouble();
Item item = new Item(itemID , name , producer , price);
System.out.println("item details: " + item.toString());
}
}