1. 程式人生 > >Javac之關於方法的調用1

Javac之關於方法的調用1

eric true with pre arguments pub highlight div light

實例1:

public class Test2{
	public void m1(){}

	public void test(){
		// javac warning: Unused type arguments for the non generic method m1() of type Test2; 
		// it should not be parameterized with arguments <String>
		new Test2().<String>m1();
	}

}

實例2:

  

Javac之關於方法的調用1