题目内容
写出程序的运行结果:public class X6_3_8 {public static void main(String[] args) {String[] a = {"student" ,"worker" ,"cadre" ,"soldier" ,"peasant" };String s1,s2;s1 = s2 = a[0];for( int i = 1; i0) s1=a[i];if (a[i].compareTo(s2)<0) s2=a[i];}System.out.println(s1+"\t"+s2);}}
查看答案
搜索结果不匹配?点我反馈