Files
corejava/corejava第11版/v1ch05/objectAnalyzer/ObjectAnalyzerTest.java
T
2019-05-22 19:43:15 +08:00

21 lines
467 B
Java

package objectAnalyzer;
import java.util.*;
/**
* This program uses reflection to spy on objects.
* @version 1.13 2018-03-16
* @author Cay Horstmann
*/
public class ObjectAnalyzerTest
{
public static void main(String[] args)
throws ReflectiveOperationException
{
var squares = new ArrayList<Integer>();
for (int i = 1; i <= 5; i++)
squares.add(i * i);
System.out.println(new ObjectAnalyzer().toString(squares));
}
}