i汽车类 package com.lanxi.demo2_3; public class Car { private String name; private int price; @Override//重写toString方法 public String toString() { return "Car [name=" + name + ", price=" + price + "]"; } public Car() {//创建无参构造方法 s…
Print类: package com.bao; public class Print { int g,s,b; void outPut() { for(int i=100;i<1000;i++) {g=i%10; s=i/10%10; b=i/100; if(ggg+sss+bbb==i) {System.out.println(i);} } } } 主类E: package com.bao; public class E { public static void main(String[]…
public class A { private int a=1; public int getA() { return a; } public void setA(int a) { this.a = a; } public void a() { System.out.println("a="+a); } public void c() { System.out.println("a-1="+(a-1)); } } package jicheng; public c…