摘要: 1 package com.example; 2 3 /** 4 * Created by Y on 16/4/13. 5 */ 6 public class Person { 7 private int age; 8 private String name; 9 public int getAge 阅读全文
posted @ 2017-01-13 10:24 894316728 阅读(121) 评论(0) 推荐(0)
摘要: 递归调用是一种特殊的调用形式,就是方法自己调自己。例:public int add(int num){ if(num == 1) return 1; //程序出口 else return num+add(num - 1);} 阅读全文
posted @ 2017-01-13 10:18 894316728 阅读(126) 评论(0) 推荐(0)
摘要: 1.封装性 对外部不可见 2.继承性 扩展类的功能 3.多态性 方法的重载 对象的多态性 阅读全文
posted @ 2017-01-13 10:17 894316728 阅读(166) 评论(0) 推荐(0)
摘要: class 类名称{ 方法; 属性;}类名称 对象名称 = new 类名称();对象名称.方法;对象名称.属性; 阅读全文
posted @ 2017-01-13 10:13 894316728 阅读(115) 评论(0) 推荐(0)
摘要: 一.集合可以理解为一个动态的对象数组,不同的是集合中的对象内容可以任意扩充。 二.Collection接口子类: 1.list接口子类: (1)ArrayList:JDK1.2之后推出;采用异步处理方式,性能高;属于非线程安全。 1 package com.example; 2 3 import j 阅读全文
posted @ 2017-01-09 11:20 894316728 阅读(169) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-01-09 10:04 894316728 阅读(108) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-01-08 13:21 894316728 阅读(119) 评论(0) 推荐(0)
摘要: 1.直接赋值:string str= “hello”; 2.new(因为堆里面开辟了两块内存空间所以不常用):string str = new string(); 3.str内容不可更改 例:string str1 = “hello”; system.out.println(str1 + “worl 阅读全文
posted @ 2017-01-08 13:13 894316728 阅读(182) 评论(0) 推荐(0)
摘要: 1.输出 2.输入 3.基本数据类型及其转换 阅读全文
posted @ 2017-01-07 08:57 894316728 阅读(216) 评论(0) 推荐(0)
摘要: 参考的三篇文章:https://www.zhihu.com/question/24565362#answer-17187332 http://wenwen.sogou.com/z/q128566269.htm http://m.blog.csdn.net/qq_35649088/article/de 阅读全文
posted @ 2017-01-07 08:51 894316728 阅读(1240) 评论(0) 推荐(1)