import java.util.Random;
public class StringTest {
public static void ini(String[] s){
//为数组初始化
for(int j = 0 ; j < s.length ; j ++){
for(int i = 0 ; i < s.length ; i ++){
s[i]= "I love you !" ;
}
}
for(int i = 1 ; i <= s.length ; i ++){
System.out.println( i + " " + s[s.length - 1] + " @5201314 " );
}
}
public static void main(String args[]){
Random ran = new Random();
//创建一个长度不大于10的且随机的String类型的数组
String[] s = new String[ran.nextInt(10)];
System.out.println("I want to loudly say " + s.length +
" times " + "\" I love you @5201314 , Vividle ! \".");
ini(s);
}
}
效果:
I want to loudly say 8 times " I love you @5201314 , Vividle ! ".
1 I love you ! @5201314
2 I love you ! @5201314
3 I love you ! @5201314
4 I love you ! @5201314
5 I love you ! @5201314
6 I love you ! @5201314
7 I love you ! @5201314
8 I love you ! @5201314
说的次数是随机的,可以修改其上限值。
分享到:
相关推荐
Ian would like to thank his wife and children for not whining too loudly, and Fletcher for putting up with his procrastination. He would also like to thank Douglas Adams for the herring sandwich scoop...
1. **特殊疑问句**:以"How"开头的特殊疑问句用来询问方式或方法,例如"How do you study for a test?"。这种问句要求回答者提供具体的行为或步骤。 2. **介词"by"的用法**:"by"后面接动词的现在分词形式(ing形式...
动词不定式还能与疑问词(what, which, how, where, when等)结合,形成不定式短语,这在表达具体动作或情况时非常有用,例如:"The question is when to start." 和 "I don’t know what to buy for you." ...
- Can I ask you for some advice? - He asked his teacher for help. #### 四、询问某人做某事 - **公式**: ask sb to do sth / ask sb not to do - **例句**: - My mother often asks me to clean my room. ...
【教育精品资料】Unit 1 How do you study for a test 这个单元主要涵盖了英语学习中的多个核心知识点,对于提升学生们的英语水平至关重要。以下是详细的解析: 1. **Check in** 和 **Check out**: 这两个短语是...
But I think you did better than I. Wow, Michael did the best of all.(谢谢。但是我认为你比我做得更好。哇,迈克尔在我们三个人中做得最好) 第三部分是单选题,测试学生的语法理解、习惯表达以及词汇运用。...
6. I have too many rules in my home. We have too much homework to do today. 选 A. too many 修饰可数名词,too much 修饰不可数名词。 7. -Can your brother swim? -No, he can't. 选 C. No, he can't,否定...
作者用到的句子是:“The comedies from Zhou Xingchi are my favorite, no matter how many times I watch them, I just can’t help laughing out loudly.” 这里,“no matter how”引导了一个让步状语从句,表示...
You must look for a zebra crossing. - 你必须看交通灯。You must watch the traffic lights. - 你千万不要在马路上踢足球。You must never play football on the road. 以上是关于六年级英语下册Unit 4 "Road ...
36. be glad + to + do / 从句: 表示对某事感到高兴,"I am glad to help you" 或 "I am glad that you passed the test". 37. be going to + v(原): 用于表示将来发生的动作,"We are going to have a picnic ...
- 在简短回答或避免重复的情况下,可以省略不定式后的动词,仅保留 "to",如答句"Yes, I'd love to.",这里的 "to" 实际上指的是 "come to the party". 6. 动词不定式的时态: - 一般式(to do):表示动作与主句...
When you get lost, you can ask the police for help. - 一些学生经常向父母要钱去玩电子游戏。Some students often ask their parents for money to play video games. - 他向父母要一辆自行车作为生日礼物。He ...
4. **情态动词**:如"I can’t wait to try the new hat."、"It is impossible for me to tell you everything.",这里的"can't wait to do"表示迫不及待要做某事,"it is impossible for sb. to do"表示某人做某事...
3. **副词用法**:"loudly"(大声地)是副词,用来修饰动词"say",增强说话的语气。 4. **动词结构**:"Sb obey"(某人顺从)展示了一种行为的被动形式,表示服从命令或指示。 5. **介词搭配**:"drop sth into"...
- **say**:强调说出具体的内容,如 "Can you say it in English?"(你能用英语说吗?) - **talk**:侧重于交谈或对话,如 "I am talking to Li Ming on the phone."(我正在和李明通电话。) - **tell**:常...
本学习资料主要关注的是八年级英语上册 Unit 6 "Have you read Treasure Island yet"的第四课时,属于鲁教版五四制教材。本课的学习目标包括掌握P61至P63的新词汇和短语,熟练运用相关知识讨论个人喜好,并学习阅读...
6. 应该关心他人的看法:"I don’t care what my teachers think." 与 "you________." 之间的对比,暗示应该在乎,所以答案是C. should。 7. 症状描述:"I _________ all day and all night." 提到的病症是流感的...
【导学案】这篇导学案是针对湖北省咸宁市嘉鱼县城北中学八年级英语下册Unit6Topic1"I have some exciting news to tell you"的内容设计的,主要聚焦于两个核心知识点:如何谈论春游并提供建议,以及动词不定式的用法...
"Remember to listen carefully and speak loudly when I call on you." 教师通过这样的提示,鼓励学生积极参与,同时强调课堂纪律。 3. 注意力吸引: "Look at the blackboard, please." 这句话用于引导学生...