JAVA试题(100道) —————————————————————————————————————— 题目1: 下面不属于基本类型的是:c (选择1项) A) boolean B) long C) String D) byte 题目2:d 如下程序中: (1)public class CharToInt (2){ (3) public static void main(String[] args) (4) { (5) int a,b=10; (6) char c='语'; (7) a=b+c
仿真农场 一个哺乳动物类如下所示: public class Mammal{ protected int age = 2; protected int weight = 5; public Mammal(){ System.out.println(“Mammal constructor”); } int getAge(){return age;} void setAge(int a){age = a;} int getWeight(){return weight;} void setWeigh