1 /* 2 * Copyright (C) 2007 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 public class Blort 18 { switchTest1(int x)19 public int switchTest1(int x) { 20 switch (x) { 21 case 1: { 22 return 2; 23 } 24 case 2: { 25 return 3; 26 } 27 case 3: { 28 return 4; 29 } 30 case 4: { 31 return 5; 32 } 33 } 34 35 return 6; 36 } 37 switchTest2(int x)38 public int switchTest2(int x) { 39 switch (x) { 40 case 1: { 41 return 2; 42 } 43 case 10: { 44 return 3; 45 } 46 case 100: { 47 return 4; 48 } 49 case 1000: { 50 return 50; 51 } 52 } 53 54 return 6; 55 } 56 } 57