摘要: 1.switch语句讲解:class SwitchDemo{ public static void main(String[] args) { /*switch语句格式: switch(表达式)//byte,short,int,char四种类型供选择; { case 取值1: 执行语... 阅读全文
posted @ 2013-03-26 15:59 馨云 阅读(315) 评论(0) 推荐(0)
摘要: class Iftest{ public static void main(String[] args) { //if语句练习_星期: int week = 8; if(week==1) System.out.println(week+"对应中文是星期一"); else if(week=... 阅读全文
posted @ 2013-03-26 14:38 馨云 阅读(205) 评论(0) 推荐(0)
摘要: 1.程序流程控制:顺序结构,判断结构,选择结构,循环结构;判断语句:if语句(三种格式):主函数代码块,类代码块,局部代码块,if代码块;public class Operate1{ public static void main(String[] args) { /* if语句的第一种格式: ... 阅读全文
posted @ 2013-03-26 11:35 馨云 阅读(424) 评论(0) 推荐(0)