2018年3月17日

摘要: 1.使用for循环; 2.使用while循环; 3.使用do-while循环; 4.提早退出循环(break,continue); 5.为循环命名。 程序Nines:显示1-200的整数与9的乘积 1 package com.jsample; 2 3 public class Nines { 4 p 阅读全文

posted @ 2018-03-17 09:39 夜逆尘 阅读(405) 评论(0) 推荐(0) 编辑

2018年3月16日

摘要: 1.使用if语句进行最基本的条件测试;2.测试一个值大于还是小于另一个值;3.测试两个值是否相等;4.使用与if语句对应的else语句;5.组合多个条件测试;6.使用switch语句进行复杂的条件测试;7.使用三元运算符创建测试; 程序Game:if语句的初步使用 1 package com.jsa 阅读全文

posted @ 2018-03-16 22:23 夜逆尘 阅读(210) 评论(0) 推荐(0) 编辑

2018年3月15日

摘要: 1.使用字符串来存储文本; 2.在程序中显示字符串; 3.在字符串中包含特殊的字符; 4.拼接字符串; 5.在字符串中包含变量; 6.比较字符串; 7.判断字符串的长度; 程序Credits:显示一部电影的导演和演员名单 1 package com.jsample; 2 3 public class 阅读全文

posted @ 2018-03-15 22:57 夜逆尘 阅读(202) 评论(2) 推荐(0) 编辑

摘要: 开发之道——读《移山之道——VSTS开发之道》后感 《移山之道——VSTS开发之道》(下简称《移山之道》)是邹欣老师的另一本书。相传很有名的《构建之法》我未曾拜读不过从这本书中对邹欣老师的水平可见一斑。读这本书花费了我将近一周的时间,然而我感觉这笔投入还是相当值得的,让我从能够编写程序,到对软件开发 阅读全文

posted @ 2018-03-15 22:46 夜逆尘 阅读(126) 评论(2) 推荐(0) 编辑

2018年3月14日

摘要: 1.创建变量; 2.使用不同类型的变量; 3.在变量中存储值; 4.在数学表达式中使用变量; 5.把一个变量的值赋给另一个变量; 6.递增/递减变量的值。 程序Variable:使用不同类型的变量并赋初值 1 package com.jsample; 2 3 public class Variabl 阅读全文

posted @ 2018-03-14 22:10 夜逆尘 阅读(222) 评论(2) 推荐(1) 编辑

2018年3月13日

摘要: 1.学习Java应用程序是如何工作的 2.构成一个应用程序 3.向应用程序传递参数 4.学习Java程序是如何组织的 5.在应用程序中创建一个对象 程序Root:输出225的正平方根 1 package com.jsample;//应用程序位于jsample包中 2 3 public class R 阅读全文

posted @ 2018-03-13 23:12 夜逆尘 阅读(201) 评论(0) 推荐(0) 编辑

2018年3月12日

摘要: 编写第一个Java程序 完成工作:1.在文本编辑器中输入一个Java程序。 2.使用括号组织程序。 3.保存、编译和运行程序。 1 package com.Jsample;//将程序的包名称命名为com.Jsample 2 3 public class Helloworld {//将程序(类)命名为 阅读全文

posted @ 2018-03-12 23:19 夜逆尘 阅读(265) 评论(2) 推荐(1) 编辑

2018年3月11日

摘要: Smallest multiple 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest posi 阅读全文

posted @ 2018-03-11 20:20 夜逆尘 阅读(159) 评论(1) 推荐(0) 编辑

2018年3月10日

摘要: Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 阅读全文

posted @ 2018-03-10 21:30 夜逆尘 阅读(158) 评论(0) 推荐(0) 编辑

2018年3月9日

摘要: Even Fibonacci numbers Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 t 阅读全文

posted @ 2018-03-09 21:32 夜逆尘 阅读(134) 评论(0) 推荐(0) 编辑