-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA.java
More file actions
46 lines (38 loc) · 825 Bytes
/
A.java
File metadata and controls
46 lines (38 loc) · 825 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
package srimathi;
import java.util.Scanner;
interface A {
void fruits();
void flower();
}
interface animal
{
void sound();
}
class birds implements A,animal
{
public void fruits()
{
Scanner sc=new Scanner(System.in);
int fruitsnumber=sc.nextInt();
System.out.println(fruitsnumber);
}
public void flower()
{
Scanner sd = new Scanner(System.in);
int flowercount=sd.nextInt();
System.out.println(flowercount);
}
public void sound()
{
Scanner sg = new Scanner(System.in);
int soundingtime=sg.nextInt();
System.out.println(soundingtime);
}
public static void main(String[]args)
{
birds b =new birds();
b.fruits();
b.flower();
b.sound();
}
}