package Chapter7;public class TestCircle2 {/** Main method */public static void main(String[] args) {// Create c1Circle2 c1 = new Circle2();// Display c1 BEFORE c2 is createdSystem.out.println("Before creating c2");System.out.println("c1 is : radius (" + c1.radius +") and number of Circle objects (" +c1.numberOfObjects + ")");// Create c2Circle2 c2 = new Circle2(5);// Change the radius in c1c1.radius = 9;// Display c1 and c2 AFTER c2 was createdSystem.out.println("\nAfter creating c2 and modifying " +"c1's radius to 9");System.out.println("c1 is : radius (" + c1.radius +") and number of Circle objects (" +c1.numberOfObjects + ")");System.out.println("c2 is : radius (" + c2.radius +") and number of Circle objects (" +c2.numberOfObjects + ")");}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。