Write a method header on line two with the following specs:
Returns: a String
Name: makeCapital
Parameters: a String named "name"
You should not be writing code on any line other than #2
Solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class Main {
public static String makeCapital(String name){
return name.toUpperCase();
}
//test case below (dont change):
public static void Bakjoon(String[] args){
System.out.println(makeCapital("test"));
}
}
|
반응형
'Java_beginner(Repl.it) > Auto-Graded-Course(AP CS A)' 카테고리의 다른 글
040 - Method Header Practice 5 (0) | 2019.12.19 |
---|---|
039 - Method Header Practice 4 (0) | 2019.12.19 |
036 - Method Header Practice 1,2 (0) | 2019.12.10 |
035 - Sum Odds in Range (0) | 2019.12.10 |
034 - Big Number Program (From Decoding) (0) | 2019.12.10 |