Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | class ManyMethods { |
| 18 | static class Strings { |
| 19 | public static String msg0 = "Hello World"; |
| 20 | public static String msg1 = "Hello World1"; |
| 21 | public static String msg2 = "Hello World2"; |
| 22 | public static String msg3 = "Hello World3"; |
| 23 | public static String msg4 = "Hello World4"; |
| 24 | public static String msg5 = "Hello World5"; |
| 25 | public static String msg6 = "Hello World6"; |
| 26 | public static String msg7 = "Hello World7"; |
| 27 | public static String msg8 = "Hello World8"; |
| 28 | public static String msg9 = "Hello World9"; |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 29 | public static String msg10 = "Hello World10"; |
| 30 | public static String msg11 = "Hello World11"; |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | static class Printer { |
| 34 | static void Print(String s) { |
| 35 | System.out.println(s); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | static class Printer2 { |
| 40 | static void Print(String s) { |
| 41 | System.out.println("AAA" + s); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | public static void Print0() { |
| 46 | Printer.Print(Strings.msg0); |
| 47 | } |
| 48 | |
| 49 | public static void Print1() { |
| 50 | Printer.Print(Strings.msg1); |
| 51 | } |
| 52 | |
| 53 | public static void Print2() { |
| 54 | Printer.Print(Strings.msg2); |
| 55 | } |
| 56 | |
| 57 | public static void Print3() { |
| 58 | Printer.Print(Strings.msg1); |
| 59 | } |
| 60 | |
| 61 | public static void Print4() { |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 62 | Printer.Print(Strings.msg4); |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | public static void Print5() { |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 66 | Printer.Print(Strings.msg5); |
| 67 | } |
| 68 | |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 69 | public static void Print6() { |
| 70 | Printer2.Print(Strings.msg6); |
| 71 | } |
| 72 | |
| 73 | public static void Print7() { |
| 74 | Printer.Print(Strings.msg7); |
| 75 | } |
| 76 | |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 77 | public static void Print8() { |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 78 | Printer.Print(Strings.msg8); |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | public static void Print9() { |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 82 | Printer2.Print(Strings.msg9); |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | public static void Print10() { |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 86 | Printer2.Print(Strings.msg10); |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | public static void Print11() { |
Mathieu Chartier | 279e3a3 | 2018-01-24 18:17:55 -0800 | [diff] [blame] | 90 | Printer.Print(Strings.msg11); |
Mathieu Chartier | d00e02b | 2017-05-24 12:04:13 -0700 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | public static void main(String args[]) { |
| 94 | Print0(); |
| 95 | Print1(); |
| 96 | Print2(); |
| 97 | Print3(); |
| 98 | Print4(); |
| 99 | Print5(); |
| 100 | Print6(); |
| 101 | Print7(); |
| 102 | Print8(); |
| 103 | Print9(); |
| 104 | Print10(); |
| 105 | Print11(); |
| 106 | } |
| 107 | } |