View Javadoc
1   import edu.umd.cs.findbugs.annotations.DesireWarning;
2   
3   
4   public class ArrayToString {
5   	
6   	private static final String[] gargs = new String[] {"1", "2"};
7   	
8   	public static void main(String[] args) {
9   		ArrayToString a = new ArrayToString();
10  		a.print0(args);
11  		a.print1();
12  		a.print2();
13  		a.print3();
14  	}
15  	
16  	@DesireWarning("DMI")
17  	public void print0(String args[]) {
18  		System.out.println(args.toString());
19  	}
20  
21  	@DesireWarning("DMI")
22  	public void print1() {
23  		String [] args2 = new String[] {"Hello", "there"};
24  		System.out.println(args2.toString());
25  	}
26  
27  	@DesireWarning("DMI")
28  	public void print2() {
29  		System.out.println((new String[] {"one","two"}).toString());		
30  	}
31  
32  	@DesireWarning("DMI")
33  	public void print3() {
34  		System.out.println(gargs.toString());
35  	}
36  }