چند نکته در مورد اینترفیس در جاوا

  • directly JVM knows that the method of the interface is abstract and it is  no need to write abstract before the method in the interface.
  • we can create reference variable of an interface, but we can not  create the object of an interface using a new keyword.
  • interface can not contain constant. They are "static final" by default.
  • one interface also can Extend other interfaces.
  • to the reference of an interface we can store the object of the class that implements the interface.
  • also we can store the reference variable of the interface to the reference
    variable of the class by using of type casting concepts.
  • interface dose not have constructor==> we can not create object of it.


نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد