157f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler/* 257f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * Copyright (C) 2014 The Android Open Source Project 357f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * 457f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * Licensed under the Apache License, Version 2.0 (the "License"); 557f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * you may not use this file except in compliance with the License. 657f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * You may obtain a copy of the License at 757f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * 857f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * http://www.apache.org/licenses/LICENSE-2.0 957f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * 1057f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * Unless required by applicable law or agreed to in writing, software 1157f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * distributed under the License is distributed on an "AS IS" BASIS, 1257f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1357f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * See the License for the specific language governing permissions and 1457f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler * limitations under the License. 1557f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler */ 1657f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler 1757f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beylerpublic class GenSelect { 1857f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler public static String test(boolean b) { 1957f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler String str1 = null; 2057f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler String str2 = null; 2157f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler String res = b ? str1 : str2; 2257f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler return res; 2357f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler } 2457f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler 2557f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler public static void run() { 2657f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler System.out.println(test(true)); 2757f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler } 2857f2bbda741d2d3d769a50268b4e0b9b54959684Jean Christophe Beyler} 29