题目内容

程序填空import _______(1)_________;//填写第1空:集合包的导入public class TestDog { public static void main(String[] args) {Dog ououDog = new Dog("欧欧", "雪娜瑞");Dog yayaDog = new Dog("亚亚", "拉布拉多");Dog meimeiDog = new Dog("美美", "雪娜瑞");Dog feifeiDog = new Dog("菲菲", "拉布拉多");//第2 、3空:定义一个ArrayList的集合对象dogs____(2)_________dogs = new ________(3)_________();dogs.add(ououDog);dogs.add(yayaDog);dogs.add(meimeiDog);// 第4空:添加feifeiDog到集合dogs中指定的第3个位置_______(4)_________;//第5空:填写方法:求集合dogs中元素的个数System.out.println("共计有" + _______(5)_________ + "条狗狗。");System.out.println("分别是:");for (int i = 0; i < dogs.size(); i++) {//第6空:填写方法:获取第i位置上的元素Dog dog = (Dog) dogs._______(6)_________;dog.showDog();}//使用迭代器遍历集合System.out.println("使用迭代器遍历集合:");Iterator it=dogs.iterator();while(_______(7)_________) {//第7空:判断集合中下一个元素是否存在Dog dog=(Dog)it.next();dog.showDog();}}}

查看答案
更多问题

下面都属于线程安全的类是( )。

ArrayList
B. Vector
C. HashMap
D. LinkedList

关于java.Util.HashSet说法正确的是()

A. 集合中的元素有序
B. 集合被保证为不可变
C. 集合中的元素保证唯一性
D. 通过唯一的键访问集合中的元素

RB is a 32-year-old male who presents to your clinic with the following symptoms: malar rash, mucosal ulcers, arthritis and photosensitivity to the sun. His medical conditions include atrial fibrillation, hypertension, low back pain, and allergic rhinitis. He also smokes 10 cigarettes a day and has 1 alcoholic drink a week. RB gets 20 minutes of exercise every other day.Medication list:ramipril 10 mg once dailyprocainamide 500 mg Q6Hloratadine 5 mg once dailyacetaminophen 325 mg Q6H PRNWhat is RB's likely diagnosis? Select one

A. Vancella infection
B. Severe sunburn
C. Systemic lupus erythematosus
D. Sepsis

Same patient from question 1.What is the likely cause of RB'S SLE (systemic lupus erythematosus)? Select one

A. Smoking
B. Procainamide
C. Hypertension
D. Loratadine

答案查题题库