for循環(huán)里面改一下就可了:

創(chuàng)新互聯(lián)公司是一家專注于網(wǎng)站建設(shè)、做網(wǎng)站與策劃設(shè)計(jì),定州網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)公司做網(wǎng)站,專注于網(wǎng)站建設(shè)十年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:定州等地區(qū)。定州做網(wǎng)站價(jià)格咨詢:18982081108
int sum = i * x + j * y;
if(sum==112){
System.out.println(i+","+j);
break;
}
答案:2天晴天和6天雨天 或 5天晴天和1天雨天
class FlowerShop {
String[] Flower = null;
int x = 0;
int y ;
FlowerShop(int x) {
Flower = new String[x];
}
public void add(String flowers) {
Flower[y] = flowers;
y++;
}
public String Information(String Flower) {
if(Flower.equals("水仙花")) {
return "水仙屬石蒜科水仙屬多年生草本植物,原產(chǎn)中國(guó),在中國(guó)已有一千多年栽培歷史," +
"為中國(guó)傳統(tǒng)名花之一。此屬植物全世界共有800多種,其中的10多種具有極高的觀賞價(jià)值。" +
"水仙原分布在中歐、地中海沿岸和北非地區(qū),中國(guó)的水仙是多花水仙的一個(gè)變種,種名為" +
":Narcissus tazetta var.chinensis Roem";
//這里省略其他的花朵信息
}
return Flower;
}
}
public class Test {
public static void main(String args[]) {
FlowerShop f = new FlowerShop (3);
f.add("水仙花");
f.add("紫羅蘭");
f.add("玫瑰花");
try {
for(int i=0; if.Flower.length; i++) {
if(args[0].equals(f.Flower[i])) {
System.out.println("你所查詢的是 :" + f.Flower[i] +"\n" +"\n" + f.Information(f.Flower[i]));
}
}} catch(ArrayIndexOutOfBoundsException e) {
System.out.println("請(qǐng)輸入要查詢的花朵信息");
}
}
}
我已經(jīng)在你的第二個(gè)百度號(hào)回答過(guò)了,你的技術(shù)要求我好多沒用到,但完全符合你的功能,你可以自行修改下。我新手,能力不是很高,希望幫到您
也可以,,不過(guò),,也有用腳本編程,編出來(lái)的..一般我們不會(huì)去編一個(gè)這個(gè)東西..都是別人編好了..我們拿來(lái)用...一般用javacript或vbscript編寫..可以去網(wǎng)上查一查...查網(wǎng)頁(yè)特效,,,將會(huì)查出好多效果...
public class Book implements Comparable{
String name;
float price;
public Book() {
}
public Book(String name,float price){
this.name=name;
this.price=price;
}
public void setName(String name){
this.name=name;
}
public String getName(){
return name;
}
public void setPrice(float price){
this.price=price;
}
public float getPrice(){
return price;
}
public int compareTo(Object b) {
if(((Book)b).price-this.price==0)
return 0;
if(((Book)b).price-this.price!=0)
return 1;
return -1;
}
}
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Iterator;
public class BookTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
String str;
System.out.println("input several Book,in the end #");
Scanner in = new Scanner(System.in);
ArrayListBook list = new ArrayListBook();
while (true) {
str = in.nextLine();
if (str.equals("#")) {
break;
}
String[] info = str.split(",");
String name = info[0];
float price = Integer.parseInt(info[1]);
list.add(new Book(name, price));
}
IteratorBook it = list.iterator();
System.out.println("input a new Book:");
str = in.nextLine();
String[] info = str.split(",");
String name = info[0];
float price = Integer.parseInt(info[1]);
Book book=new Book(name,price);
System.out.println("new book:"+ name +"as same bo
分享題目:java代碼鮮花,java玫瑰花代碼
文章URL:http://chinadenli.net/article17/dsiijgj.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、服務(wù)器托管、Google、軟件開發(fā)、、品牌網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)