forked from kaal-coder/hacktoberfest2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram_50.java
More file actions
36 lines (33 loc) · 781 Bytes
/
Copy pathprogram_50.java
File metadata and controls
36 lines (33 loc) · 781 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
interface vehical
{
// String Name="TVS"; //public + static + final
// int speed=100; //public + static + final
void start();
void stop();
default void colour()
{
System.out.println("tvs colour is red");
}
static void speed()
{
System.out.println("tvs speed is 100 km/hr");
}
}
class cust implements vehical
{
@Override
public void start()
{
System.out.println("start(): insert key & press start button");
}
@Override
public void stop()
{
System.out.println("stop(): exit key");
}
public static void main(String[] args) {
cust c=new cust();
c.start(); c.stop(); c.colour();
vehical.speed();
}
}