
Java 平时学习积累
jjx307998840
这个作者很懒,什么都没留下…
展开
-
java 按位操作符和移位操作符
package Chapter3;import java.util.*;public class BitOperators { /** * @param args */ public static void main(String[] args) { int i1 = 0x2a; int i2 = 0x2b; System.out.pri原创 2009-11-09 23:02:00 · 782 阅读 · 0 评论 -
java中Random的用法
import java.util.Random;public class MathOperators { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //随机数的产生 int[] arr = new int[原创 2009-11-09 16:47:00 · 997 阅读 · 0 评论 -
java 用float和double指数记数法所能表示的最大和最小的数字
public class MaxMinFloatDouble { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub float fmax = Float.MAX_VALUE; float fmin = Float原创 2009-11-09 23:00:00 · 2559 阅读 · 0 评论 -
java中this关键字用法
/** * this关键字用法 */public class Flower { int petalCount = 0; String s = "initial value"; Flower(int petals){ petalCount = petals; System.out.println("Constructor with one int a原创 2009-11-12 10:50:00 · 469 阅读 · 0 评论 -
java中的foreach用法
import java.util.*;public class ForeachExample { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Random r = new Random(); int[] x原创 2009-11-12 10:44:00 · 630 阅读 · 0 评论