Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javalab;
- interface man{
- void name();
- }
- interface woman{
- void occupation();
- }
- class human implements man,woman{
- public void name(){
- System.out.println("Atik");
- }
- public void occupation(){
- System.out.println("Teacher");
- }
- }
- public class interfaceP{
- public static void main(String[] args) {
- human h1=new human();
- h1.name();
- h1.occupation();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement