package hanqi; import java.util.Scanner; public class Test7 { public static void main(String[] args) { //在主方法中定义一个大小为50的一维整型数组,数组i名为x,数组中存放着{1,3,5,…,99}输出这个数组中的所有元素,每输出十个换一行 int [] x=new int[50]; int a =1; for(int i=0;i<50;i++) { x[i]=a; a+=2; } for(…
package java1; public class Che { //属性 public String nub; public int speed; public double weight ; Che() { nub="XX1234"; speed=100; weight=100; } Che(String nub, int speed,double weight) { this.nub = nub; this.speed = speed; this.weight = weight…
package com.hanqi.test; public class Animal { private String name; private int legs; private int count; public String getKind() { return name; } public void setKind(String name) { this.name = name; } public int getLegs() { return legs; } public void…
//Animal 类 package d922B; public class Animal { private String kind; private int legs,count; public String getKind() { return kind; } public void setKind(String kind) { this.kind = kind; } public int getLegs() { return legs; } public void setLegs(int…
package java1; public class People { public String name; public int age; public String sex; public String height; People(String name, int age, String sex, String height) { this.name = name; this.age = age; this.sex = sex; this.height = height; } publ…