Skip to main content
summaryrefslogtreecommitdiffstats
blob: 3f164d35db768de46ece7535bb8406705ca25873 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package argument_out;

import java.io.Serializable;

public class TestVarargs6 {

	private static class Warnings {};
	
	public void varargs(Serializable... args) {
		for (Serializable arg : args) {
			System.out.println(arg);
		}
	}
	
	public void singleArgumentTransfer() {
		Warnings[] args= { new Warnings(), new Warnings() };
		Serializable[] args1 = {args};
		/*]*/for (Serializable arg : args1) {
			System.out.println(arg);
		}/*[*/
	}	
}

Back to the top