package lianxi; public interface InterfaceA { void printCapitalLetter(); } package lianxi; public interface InterfaceB { void printLowercaseLetter(); } package lianxi; public class Print1 implements InterfaceA, InterfaceB { @Override public void prin…
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[]…
package zuoye8; public abstract class Shape { private double zhouchang ; private double mianji ; public Shape(double zhouchang, double mianji) { super(); this.zhouchang = zhouchang; this.mianji = mianji; } public Shape() { super(); } //抽象一个周长方法 publi…
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…