-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProduct2.java
27 lines (23 loc) · 882 Bytes
/
Product2.java
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
public class Product2 {
/*
* Assignment-2 (Variable and Data type)
* step 1: create a class called Product
* step 2: create a main method
* step 3: declare variables: id, title, price, description, category
* step 4: assign the following data in main method
101,iphone15,1895 euros,perfect product with best image quality, phone,
* step 5: print the data
*/
public static void main(String[]args){
int id = 101;
String title = "iphone15";
String price = "1895 euros";
String description = "perfect product with best image quality";
String category = "phone";
System.out.println("id"+id);
System.out.println("title" +title);
System.out.println("price" +price);
System.out.println("description" +description);
System.out.println("catagory" +category);
}
}