forked from CMPSC1500-Spring17/Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctionNotes
More file actions
30 lines (21 loc) · 683 Bytes
/
functionNotes
File metadata and controls
30 lines (21 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
~~~
FUNCTION STUFF
private static int sum(int[] number)
public = not protected function made availble
private =it is protected used within file
static =??????
int(or String or char..or void(returns nothing) = tells what the function should return if it is int it will return an interger; void returns nothing
sum =name of function
(int[]= type of passed in variable
numbers = name of passed in variable
Function calling itself?
What happens if function calls itself within itself?
~~~
~~~
ARRAYS
int[] a;
a =new int[3];
a.length= size of the array
int[] a;= int[] is type of array and {a} is the name of the array
a =new int[3]= determines the size of the array
~~~