gcc/libjava/testsuite/libjava.lang/emptystring.java
Mark Wielaard de6ba6e546 For PR java/6519:
* libjava.lang/emptystring.java: New.
	* libjava.lang/emptystring.out: New.

From-SVN: r53157
2002-05-04 13:24:40 +00:00

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";
}
}