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[]…