MCPcopy Index your code
hub / github.com/careercup/ctci / getFriends

Method getFriends

java/Chapter 10/Question10_2/Person.java:15–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 }
14
15 public int[] getFriends() {
16 int[] temp = new int[friends.size()];
17 for (int i = 0; i < temp.length; i++) {
18 temp[i] = friends.get(i);
19 }
20 return temp;
21 }
22 public int getID() { return personID; }
23 public void addFriend(int id) { friends.add(id); }
24

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected