Advertisement
ivana_andreevska

Edna klasa implementira poveke interfejsi

Jul 24th, 2022
915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. package AV2;
  2. interface A{
  3.     void showA();
  4. }
  5. interface B{
  6.     void showB();
  7. }
  8. interface C{
  9.     void showC();
  10. }
  11. public class Proba implements A,B,C{
  12.     public static void main(String[] args) {
  13.         Proba proba=new Proba();
  14.         proba.showA();
  15.         proba.showB();
  16.         proba.showC();
  17.     }
  18.  
  19.     @Override
  20.     public void showA() {
  21.         System.out.println("Interfejs A");
  22.     }
  23.  
  24.     @Override
  25.     public void showB() {
  26.         System.out.println("Intrfejs B");
  27.     }
  28.  
  29.     @Override
  30.     public void showC() {
  31.         System.out.println("Interfejs C");
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement