-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaCoursera
More file actions
23 lines (17 loc) · 836 Bytes
/
JavaCoursera
File metadata and controls
23 lines (17 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Module: Object design: constructors, instance variables, methods
//Core: Overloading methods
methods can be overloaded as long as their signatures are different.
signature = parameters and method name //not return type
so to overload a method, we should provide different parameters. //because if overloading, method name will be same.
//Following is not overloading
//it's a compilation error
//because parameter list is same, only return type differs
//and return type is not considered as part of signature of the method
public int someMethod(int a){...}
public float someMethod(int a){...}
============
Lesson 5 of 7
Drawing memory models with primitive data:
objective:
1.Draw memory models for reasoning about variable values for primitive type data
2.Update memory models to trace the state of the variables in Java code