PoeticalJustice

导航

2017年9月28日 #

break and continue

摘要: 1 public class TestBreakAndContinue { 2 3 /** 4 * 测试break and continue 5 */ 6 public static void main(String[] args) { 7 int total =0; 8 System.out.println(... 阅读全文

posted @ 2017-09-28 21:49 PoeticalJustice 阅读(123) 评论(0) 推荐(0) 编辑

debug

摘要: 以后再说 截图 阅读全文

posted @ 2017-09-28 21:48 PoeticalJustice 阅读(108) 评论(0) 推荐(0) 编辑

whlie and for

摘要: 1 public class TestWhileAndFor { 2 3 /**测试 while和for循环练习 4 * 100 以内的奇数和偶数的和 5 * @author Administrator 6 * 7 */ 8 public static void main(String[] args) { 9 ... 阅读全文

posted @ 2017-09-28 21:47 PoeticalJustice 阅读(132) 评论(0) 推荐(0) 编辑

while and for 2

摘要: 1 public class TestWhileAndFor2 { 2 3 /** 4 * 九九乘法表 5 * 1!+2!+3!+....+10!=? 6 * 7 */ 8 public static void main(String[] args) { 9 /* 10 for(int... 阅读全文

posted @ 2017-09-28 21:47 PoeticalJustice 阅读(121) 评论(0) 推荐(0) 编辑

Switch

摘要: 1 /** 2 * JDK7.0新特性 7.0以前 表达式的结果只能是int(或者可以自动转成int的 byte short char)枚举类型 3 * 7.0之后 表达式可以是 字符串! 4 * 如果想看效果 就装上7以上的版本 5 */ 6 public class TestSwitch { 7 public static void main(Stri... 阅读全文

posted @ 2017-09-28 21:46 PoeticalJustice 阅读(150) 评论(0) 推荐(0) 编辑

Scanner

摘要: 1 import java.util.Scanner; 2 3 /** 4 * 测试 Scanner类的使用,如何接受键盘的输入. 5 * @author Administrator 6 *@version 1.0 7 */ 8 public class TestScanner { 9 10 public static void test01(){ ... 阅读全文

posted @ 2017-09-28 21:45 PoeticalJustice 阅读(142) 评论(0) 推荐(0) 编辑

Method

摘要: 1 /** 2 * @author Administrator 3 * @version 1.0 4 * 为什么需要方法 ? method 完成特定功能的代码片段 5 * 方便复用 6 * 输入(参数列表)=> 方法 (运算) => 输出(返回值) 7 * JAVA中只要值传递 传递对象 是 对象的引用的传递 8 * 9 * 设计方法 最... 阅读全文

posted @ 2017-09-28 21:44 PoeticalJustice 阅读(140) 评论(0) 推荐(0) 编辑

Recursion递归

摘要: 1 /*java.lang 核心包 如 String Math Integer System Thread等 拿来直接用 2 * java.awt 窗口工具 GUI 3 * java.net 网络包 4 * java.io 输入 输出 5 * java.util 工具类 日期 日历 定义 系统特性 6 * 7 * 8 */ 9 public class... 阅读全文

posted @ 2017-09-28 21:44 PoeticalJustice 阅读(162) 评论(0) 推荐(0) 编辑

for

摘要: 1 public class TestFor { 2 3 /** 4 * 测试for循环; 5 * 加强版for循环 foreach 6 */ 7 public static void main(String[] args) { 8 for(int a=0;a<=100;a++){ 9 ... 阅读全文

posted @ 2017-09-28 21:42 PoeticalJustice 阅读(90) 评论(0) 推荐(0) 编辑

if

摘要: 1 // 测试if 2 public class TestIf { 3 public static void main(String[]args){ 4 //[0,1)的随机小数 5 double d =Math.random(); 6 int e= 1+(int)(d*6); 7 System.out.pri... 阅读全文

posted @ 2017-09-28 21:42 PoeticalJustice 阅读(158) 评论(0) 推荐(0) 编辑

dowhile

摘要: 1 public class TestDoWhile { 2 3 /**do while 至少执行一次 先斩后奏 4 * 测试dowhile 5 */ 6 public static void main(String[] args) { 7 int a=0; 8 while(a<0){ 9 ... 阅读全文

posted @ 2017-09-28 21:41 PoeticalJustice 阅读(215) 评论(0) 推荐(0) 编辑

while

摘要: 1 public class TestWhile { 2 3 /** 4 * 测试循环 5 */ 6 public static void main(String[] args) { 7 int a=1; 8 while(a<=100){ 9 System.out.println(a)... 阅读全文

posted @ 2017-09-28 21:40 PoeticalJustice 阅读(144) 评论(0) 推荐(0) 编辑

DataType 数据类型

摘要: 基本类型:四类八种:数值 : 整数:byte,short,int,long。默认是 int 小数:float,double 默认是 double 布尔:boolean 字符:char 引用类型:数组,对象,接口 阅读全文

posted @ 2017-09-28 21:38 PoeticalJustice 阅读(836) 评论(0) 推荐(0) 编辑

char

摘要: 1 public class TestChar { 2 3 4 public static void main(String[]args){ 5 /* 6 char c1='A'; 7 8 int f=c1+1; 9 char... 阅读全文

posted @ 2017-09-28 21:30 PoeticalJustice 阅读(144) 评论(0) 推荐(0) 编辑

Constructor构造方法

摘要: 我们写一个car类,并写一个无参构造方法。 我们来创建一个对象car 写个main方法,看下效果。 控制台打印 构造器不能被继承 只能被调用 所以不存在overwrite 但可以overload 阅读全文

posted @ 2017-09-28 21:28 PoeticalJustice 阅读(288) 评论(0) 推荐(0) 编辑

overload重载

摘要: 方法的重载 阅读全文

posted @ 2017-09-28 21:22 PoeticalJustice 阅读(188) 评论(0) 推荐(0) 编辑

static关键字

摘要: 1 public class Student { 2 String name; 3 int id; 4 5 static int ss; 6 public static void printSS(){ 7 //为什么报错 静态方法 不能引用 非静态变量? 8 //分析内存 因为 静态方法从属于类Studen... 阅读全文

posted @ 2017-09-28 21:21 PoeticalJustice 阅读(148) 评论(0) 推荐(0) 编辑

this关键字

摘要: 1 public class Student { 2 String name; 3 int id; 4 //无参构造方法 5 public Student(){ 6 System.out.println("我是无参构造方法"); 7 } 8 9 //有参的构造方法 可以调无参的构造方法 必须在第一行 1... 阅读全文

posted @ 2017-09-28 21:18 PoeticalJustice 阅读(159) 评论(0) 推荐(0) 编辑

继承

摘要: 继承的好处 * 1 OOP面向对象 编程 提高代码复用性 * 2 OOD面向对象 设计 对某一类的抽象 实现对现实世界更好的建模 * 类继承 是单继承 , 不继承构造方法. *接口可以多继承 *java.lang.object是根基类 如果你继承后边什么不写 他会继承根基类 接口是多继承 * ove 阅读全文

posted @ 2017-09-28 21:16 PoeticalJustice 阅读(120) 评论(0) 推荐(0) 编辑

ORACLE数据库 常用命令和Sql常用语句

摘要: ORACLE 账号相关 如何获取表及权限 1.COPY表空间backup scottexp登录管理员账号system2.创建用户 create user han identified(认证) by mima default tablespace users(默认的表空间) quota(配额)10M 阅读全文

posted @ 2017-09-28 21:09 PoeticalJustice 阅读(357) 评论(0) 推荐(0) 编辑