-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoop(task_1).java
More file actions
54 lines (33 loc) · 859 Bytes
/
Copy pathoop(task_1).java
File metadata and controls
54 lines (33 loc) · 859 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
48
49
50
51
52
53
54
class mobile{
String name;
String colour;
String model;
String battery_timing;
void display(){
System.out.println("company name is :"+name);
System.out.println("mobile model:"+model);
System.out.println("mobile colour:"+colour);
System.out.println("battery timing:"+battery_timing);
}
public static void main(String args[])
{
mobile motorolla=new mobile();
mobile samsung=new mobile();
mobile nokia=new mobile();
motorolla.name="motorolla";
motorolla.colour="grey";
motorolla.model="md-70";
motorolla.battery_timing="700Mah";
nokia.name="nokia";
nokia.colour="blue";
nokia.model="md-90";
nokia.battery_timing="1000Mah";
samsung.name="samsung";
samsung.colour="yellow";
samsung.model="nk-70";
samsung.battery_timing="200Mah";
motorolla.display();
nokia.display();
samsung.display();
}
}