mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 21:59:43 +08:00
16 lines
446 B
Java
16 lines
446 B
Java
|
public class emptystring
|
||
|
{
|
||
|
public static void main(String[] args)
|
||
|
{
|
||
|
System.out.println("null".equals(n(0) + ""));
|
||
|
System.out.println("null".equals("" + n(0)));
|
||
|
System.out.println("x".equals(n(1) + ""));
|
||
|
System.out.println("x".equals("" + n(1)));
|
||
|
}
|
||
|
|
||
|
static String n(int i)
|
||
|
{
|
||
|
if (i==0) return null; else return "x";
|
||
|
}
|
||
|
}
|