摘要: //java中常量的定义 public class first{ static final int YEAR=365; //声明一个常量 public static void main(String[] args){ System.out.println("两年等于"+2*YEAR+"天"); } 阅读全文
posted @ 2016-05-16 20:56 颖珂烨S 阅读(199) 评论(0) 推荐(0)
摘要: /* 作者:SLM 日期:2016-4-16 功能: */ public class lei { public static void main(String[] args) { // TODO Auto-generated method stub //创建一个猫对象 Cat cat1=new Ca 阅读全文
posted @ 2016-04-16 21:28 颖珂烨S 阅读(212) 评论(0) 推荐(0)
摘要: /* *作者:舒隆梅 *日期:2016-4-8 *功能:判断两个数的大小 */import java.io.*;public class yunsuanfu { public static void main(String[] args) { try { //输入流,从键盘输入数 InputStre 阅读全文
posted @ 2016-04-08 21:59 颖珂烨S 阅读(269) 评论(0) 推荐(0)
摘要: int a=2; int b=a++; int c=++a; System.out.println(b); //输出的b值为2 System.out.println(c); //输出的c值为4 阅读全文
posted @ 2016-04-08 21:28 颖珂烨S 阅读(161) 评论(0) 推荐(0)
摘要: /* *作者:舒隆梅 *日期:2016-4-8 *功能:判断两个数是否能够整除 */public class yunsuanfu { public static void main(String[] args) { int a=1; int b=2; if(b%a==0) { System.out. 阅读全文
posted @ 2016-04-08 21:18 颖珂烨S 阅读(4593) 评论(0) 推荐(0)