اینترفیس و Abstract در جاوا

  • new keyword is not applicable before interface
  • Abstract methods are methods without body
  • Abstract method contains only signature(return type, name of the method and arguments) example: abstract public void meth(int x , int y);
  • Interface is a fully unimplemented structure  supported by java.
  • Interface contains all abstract methods.
  • we are using keyword Interface to declare a interface.
  • the class who wants to provide the body, for these abstract methods those class has to implement the interface using implements keyword and that class has to provide the body for all those abstract methods.
  • JVM creates the .class file according to the structures presented in the program.
نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد