ACCTG 1 Lecture Notes - Lecture 7: Explicit And Implicit Methods

6 views8 pages
6 Sep 2020
School
Department
Course
Professor

Document Summary

Instance fields are variables that store the states of the objects. An instance field declaration consists of: access specifier (such as private or public); type of variable (such as double); name of variable (such as balance). The methods change the object state or compute the relationships with other objects. The return statement: the return statement returns a value of an expression and exits the method immediately. If the type of the method is different from void then the returned value has to be of the same type as the type of the method. return ; If the type of the method is void then there is no returned value: return; Parameter and local variables: parameter variables are the variables in the method"s definition. When a method is called with factual values, their types have to match the types of the parameter variables: local variables are the variables defined in the method"s bodies.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions