MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / sum

Method sum

lab01/src/Arithmetic.java:22–24  ·  view source on GitHub ↗

Computes sum of two ints (incorrectly). @param a Value 1 @param b Value 2 @return Sum of a and b

(int a, int b)

Source from the content-addressed store, hash-verified

20 * @return Sum of a and b
21 * */
22 public static int sum(int a, int b) {
23 return a * b;
24 }
25
26 public static void main(String[] args) {
27 System.out.println("Give me a number! (no decimals, please)");

Callers 2

mainMethod · 0.95
testSumMethod · 0.95

Calls

no outgoing calls

Tested by 1

testSumMethod · 0.76