CSC207H5 Lecture Notes - Lecture 2: Unified Modeling Language, Init

78 views1 pages
1 Apr 2018
School
Course

Document Summary

We have done oo programming in python, so you know what it"s all about. So let"s focus on the differences between python and java. Overall, java is a more rigorous language than python in terms of expressing the structure of. Constructor in python, it is a method named __init__ in java, it is a method with the same name as the class. Has no return type, not even void. Can have multiple constructors with different type signatures. The one with the matching signature will be called. This is like python"s self keyword: static. With static, it is a function, which is called by name only; it is independent of any object. Without static, it is a method, which is called by a name that is associated to an object. keyword static used on variables. It is a variable which belongs to the class and not to object (instance)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions