Annotation

 package com.company;

@FunctionalInterface
interface myFunctionalInterface{
void meth1();
// void meth2();
}
class myCLass{
public void play(){
System.out.println("Playing the music");
}
}
class hello extends myCLass{
@Override
@SuppressWarnings("Use paly method")
public void play(){
System.out.println("Playing the video");
}
@Deprecated
public int add(int a, int b){
return a+b;
}
}
@SuppressWarnings("deprecation")

public class CWH_108_Annotation {
public static void main(String[] args) {
hello h= new hello();
h.play();
h.add(4,5);
}
}

Comments