⭕ Overview
▶️ Correction at 6:45 - should be "...set the data from 12 to 200". Sorry.
Below are some general characteristics of classes, interfaces, and traits. The lists are incomplete and not detailed but capture some important features to understand them.
🟩 CLASSES
Can:
CAN have a constructor
CAN have zero or more data members and/or methods
CAN be used to instantiate objects
CAN only extend a maximum of one Class (abstract or concrete)
CAN implement many Interfaces
CAN use many Traits
Cannot:
CANNOT have abstract methods
CANNOT have nested Classes
🟩 TRAITS
Can:
CAN have a constructor
CAN have data fields
CAN have methods
CAN use many Traits
Cannot:
CANNOT extend Classes or implement Interfaces
CANNOT have abstract methods
CANNOT be used to instantiate objects
🟩 INTERFACES
Can:
CAN extend many Interfaces
CAN have only function definitions
CAN only be implemented by an abstract or concrete Class
Cannot:
CANNOT have a constructor
CANNOT have data members
CANNOT have abstract methods
CANNOT be used to instantiate objects
CANNOT extend Classes or use Traits
⭕ About me
I am a Web Instructor, and I’ve authored a textbook and some complete sets of video training courses for / learning (formerly Lynda.com) and https://www.packtpub.com.
⭕ Visit my site: https://christianhur.com
⭕ My complete online training courses:
☑️ The DOM in JavaScript, jQuery, AngularJS, and React : / the-dom-in-javascript-jquery-angularjs-and...
☑️ Building JSF Web Applications with Java EE 7: / building-jsf-web-applications-with-java-ee-7
☑️ Troubleshooting Vue.js: https://www.packtpub.com/application-...
☑️ Angular 7 New Features: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Flask: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Django & Angular 8: https://www.packtpub.com/web-developm...
☑️ Angular 9 New Features: https://www.packtpub.com/web-developm...
⭕ Check out my book:
Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript is available on Amazon and MC Press.
☑️ Link: https://www.mc-store.com/collections/...
Смотрите видео PHP Classes, Interfaces, and Traits (Ep. 4) онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Christian Hur 15 Июнь 2020. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 338 раз и оно понравилось 9 посетителям.