摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 类 Object:是类层次结构的根类。每个类都使用 Object 作为超类。所有对象(包括数组)都实现这个类的方法。 6 7 ... 阅读全文
posted @ 2017-03-13 20:56 {name:"代码屠夫"} 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 成员方法的参数列表: 6 // 1、参数列表中的数据类型是值类型 7 // 2、参数列表中的数据类型是引用类型 8 ... 阅读全文
posted @ 2017-03-13 18:39 {name:"代码屠夫"} 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 仔细想一想,Animal应该是一个抽象的概念,相对于Animal来说,狗才是具体的概念 6 // Animal的行为也应该算是一个抽象的行为 ... 阅读全文
posted @ 2017-03-12 21:47 {name:"代码屠夫"} 阅读(589) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 继承关系的子类可以重写父类给它的成员方法 6 // 有时,父类不希望它的成员方法被子类重写(覆盖),对于这种要求,如何处理? 7 ... 阅读全文
posted @ 2017-03-12 21:22 {name:"代码屠夫"} 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 继承关系中的private访问权限:子类只能访问父类中的非私有的成员 6 } 7 } 8 9 //// 父类 10 //class Fathe... 阅读全文
posted @ 2017-03-12 12:03 {name:"代码屠夫"} 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // this 关键字 的使用 6 7 Student student = new Student(); 8 ... 阅读全文
posted @ 2017-03-11 08:24 {name:"代码屠夫"} 阅读(542) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 传递 值类型参数 和 传递 引用类型参数 6 int i = 2; 7 int j = 3; 8 Sys... 阅读全文
posted @ 2017-03-09 22:17 {name:"代码屠夫"} 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 面向对象思想 6 7 // 回顾编程语言思想进化之路:从面向过程到面向对象 8 9 ... 阅读全文
posted @ 2017-03-09 22:13 {name:"代码屠夫"} 阅读(406) 评论(0) 推荐(1) 编辑
摘要: 1 package cn.temptation; 2 3 import java.util.Scanner; 4 5 public class Sample01 { 6 public static void main(String[] args) { 7 // 需求:编写程序打印如下效果:(杨辉三角变体) 8 // ... 阅读全文
posted @ 2017-03-03 18:32 {name:"代码屠夫"} 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 需求:小店对自己的销售额按季度进行统计,2016年各个季度统计如下: 6 // 第1季度:1月---10k 2月---1... 阅读全文
posted @ 2017-02-26 11:46 {name:"代码屠夫"} 阅读(516) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 import java.util.Scanner; 4 5 public class Sample01 { 6 public static void main(String[] args) { 7 // 需求:定义一个数组存储星期一、星期二、...星期日,打印该数组形式为[星期一, ... 阅读全文
posted @ 2017-02-26 11:40 {name:"代码屠夫"} 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 需求:一堆分数,要统计最高分、最低分、总分、平均分 6 // int score1 = 80; 7 // int score2 ... 阅读全文
posted @ 2017-02-26 11:35 {name:"代码屠夫"} 阅读(456) 评论(2) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 1、需求:打印如下图形 6 /* 7 * * * 8 * * * 9 ... 阅读全文
posted @ 2017-02-26 11:30 {name:"代码屠夫"} 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 方法/函数 Method/Function 6 7 // 为什么会出现方法? 8 // 原因1、在程序中多处出现相同的语... 阅读全文
posted @ 2017-02-26 11:22 {name:"代码屠夫"} 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // for循环 6 // 格式 7 // for (int i = 初始值; i 先做左初值的变量声明 和 赋初始化值 23 ... 阅读全文
posted @ 2017-02-26 11:06 {name:"代码屠夫"} 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 需求:写一万次"我错了!" 6 7 // 方式1、使用CV大法 8 System.out.println... 阅读全文
posted @ 2017-02-26 10:56 {name:"代码屠夫"} 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 程序的流程控制(流程结构):顺序结构、选择结构、循环结构 6 7 // 顺序结构:从上向下,顺序执行 8 ... 阅读全文
posted @ 2017-02-26 10:45 {name:"代码屠夫"} 阅读(277) 评论(0) 推荐(1) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 // 运算符:对常量 或是 变量进行操作的符号 6 // 分为:算术运算符、赋值运算符、比较运算符、逻辑运算符、位运算符 7 ... 阅读全文
posted @ 2017-02-25 22:49 {name:"代码屠夫"} 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.temptation; 2 3 public class Sample01 { 4 public static void main(String[] args) { 5 System.out.println("第一个例子"); 6 } 7 } 1 package cn.temptation; 2 3 public class... 阅读全文
posted @ 2017-02-25 22:33 {name:"代码屠夫"} 阅读(375) 评论(0) 推荐(1) 编辑
摘要: 基于node.js的web开发框架express简单方便,很多项目中都在使用。这里结合MySQL数据库,实现最简单的CRUD操作。 开发环境: IDE:WebStorm DB:MySQL 1、使用WebStorm创建node.js express应用程序,express框架可以根据使用者的爱好设置页 阅读全文
posted @ 2016-12-30 16:12 {name:"代码屠夫"} 阅读(2515) 评论(1) 推荐(1) 编辑