I am really by fresh ingredients, intricate cooking and diverse traditions of Chinese food.
class ABC {
String name;
double price;
public ABC(String na, double pr) {name=na; price=pr;}
public int compareTo(ABC x) {
if(name.compareTo(x.name)>0) return 1;
if(name.compareTo(x.name)<0) return -1;
else return 0;
}
}
public class XXK5 {
public static void main(String[] args) {
String []s={"apple", "pear", "tangerme", "banana", "grape"};
double []d={3.8, 2.5, 3.2, 4.3, 5.2};
ABC []ar=new ABC[s.length];
int i,k=0;
for(i=0; i<ar.length; i++)
ar[i]=new ABC(s[i],d[i]);
for(i=1; i<ar.length; i++)
if(ar[i].compareTo(ar[k])>0) k=i;
System.out.println(ar[k].name+" "+ar[k].price);
}
}
— I wonder whether I could accept this discount or not.
—
I’ve learned today.
A.vital B.silent C.collide D.fierce
I really like that car you ________ and I am thinking of buying it.
— I am sorry. Now what were we talking about?
— .
—I’m terribly sorry that I’ve spilled some coffee on the table.
— _________________.
—Can you go skating with us this afternoon?
—Sorry, I can’t. I ________ take care of my little sister at home.
下面程序的输出结果是:
public class Test{
void printValue(int m){
do { System .out .println(“The value is”+m);}
while(- - m>10);
}
public static void main(String arg[]){
int i=10;
Test t= new Test();
t.printValue(i);}}
I’m particularly proud of I organized the finances.
—Though I have been drinking, I can drive home safely.
—No, I will be the driver.
—Our son has picked up some bad habits recently, and I am really worried about it.
— .
—I’m terribly sorry that I’ve spilled some coffee on the table.
— _________________.
— Hi, Helen, I’ll have an interview tomorrow. I’m afraid I can’t make it.
—
—May I ask you why you left the former company?
—
— ?
— I have worked for IBM for 3 years.
— I am sorry. Now what were we talking about?
— .
— Did the medicine make you feel better?
— No. The more , I feel.
—Can you go skating with us this afternoon?
—Sorry, I can’t. I ________ take care of my little sister at home.
—
— Thank you. I must say I have a great staff.
I am really by fresh ingredients, intricate cooking and diverse traditions of Chinese food.
— Some cars are really expensive.
—
— I'm sorry. I shouldn't have put the printer here.
— .
I really appreciate __________ to help me, but I am sure that I will be able to manage by myself.
I am interested in novels by Hemingway.
public class XXK4 {
public static void main(String[] args) {
int []a={2,5,8,10,15,20};
int s=0;
for(int i=0; i<a.length; i++) s+=a[i];
System.out.println("s="+s);
}
}
public class XXK4 {
public static void main(String[] args) {
int [][]a={{2,5,8},{3,6,9},{4,5,6}};
int []b=new int[3];
int i,j;
for(i=0; i<a.length; i++)
for(j=0; j<a[i].length; j++)
b[i]+=a[i][j];
for(i=0; i<b.length; i++)
System.out.print(b[i]+" ");
}
}
class ABC {
int a,b;
public ABC(int a, int b) {this.a=a; this.b=b;}
public int compareTo(ABC x) {return a*b-x.a*x.b;}
}
public class XXK5 {
public static void main(String[] args) {
int [][]d={{3,8},{4,6},{5,6},{2,9},{6,7},{5,8}};
ABC []ar=new ABC[d.length];
int i,k=0;
for(i=0; i<ar.length; i++)
ar[i]=new ABC(d[i][0],d[i][1]);
for(i=1; i<ar.length; i++)
if(ar[i].compareTo(ar[k])>0) k=i;
System.out.println("k="+k);
}
}
免费的网站请分享给朋友吧