i 绝望

依然

Miss Lang
  2013年12月28日
摘要: 总结:这里主要是for循环里的j<=i而不死j<=i-1;.还有先打印“*”再打印空格。换行。理解。请用脑子啊package com.sads;public class Dds { public static void main(String[] args) { for(int i=0;i<=5;i++){ for(int j=1;j<=i;j++){ System.out.print("* "); } System.out.println(""); } }}//* * * * * * * * * * * * * * * 阅读全文
posted @ 2013-12-28 23:47 juewang 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 总结:package com.sads;//?://这个运算符是条件运算符//条件式?值:值public class Sd { public static void main(String[] args) { int x=10; int y=20; int max=x>y?x:y; System.out.println(max);//-----20 int a=-10; int abs=a>0?a:-a; System.out.println(abs);//=-==10 }}2010 阅读全文
posted @ 2013-12-28 08:06 juewang 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 总结:&& :两者均满足。是true||: 两者中有一个满足就为true,不然就是falsepackage com.sads;public class shou { public static void main(String[] args) { int n=2; // boolean b=!(n>=0)&&(n=10);//这里有两种方式 0-----||这是逻辑或//当条件中有一个满足时,就为ture,不然就是false System.out.println(b2);//是false }} 阅读全文
posted @ 2013-12-28 07:49 juewang 阅读(420) 评论(0) 推荐(0) 编辑

绝望依然

Miss Lang