10 2016 档案
摘要:java.util.concurrent.atomic包里面有原子操作相关的类 一、基本的类为 1.AtomicInteger 2.AtomicLong 3.AtomicBoolean 4.AtomicReference 5.AtomicStampedReference 6.AtomicMarkab
阅读全文
摘要:java.util.concurrent.Semaphore这个类里面的主要方法为: void acquire():Acquires a permit from this semaphore, blocking until one is available, or the thread isinte
阅读全文
摘要:java.util.concurrent.CountDownLatch这个类里面的主要方法为: 1.countDown(),Decrements the count of the latch, releasing all waiting threads if the count reaches ze
阅读全文
摘要:java.nio java.nio.channels java.nio.channels.spi java.nio.charset java.nio.charset.spi java.nio.file java.nio.file.attribute java.nio.file.spi java.io
阅读全文
摘要:1.java.util.concurrent.locks包里面的主要接口Lock,Condition,ReadWriteLock,主要的类为ReentrantLock,ReentrantReadWriteLock,ReentrantReadWriteLock.ReadLock,ReentrantRe
阅读全文
摘要:1 .java.lang.Double Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Dou
阅读全文
摘要:1.public static boolean equals(Object a, Object b) 2. public static int hashCode(Object o) Returns the hash code of a non-null argument and 0 for a nu
阅读全文
摘要:1. public static <T> List<T> asList(T... a) 2.public static int hashCode(long[] a) 3.public static String toString(long[] a) 4.public static int deepH
阅读全文
摘要:1.代理模式使用到的接口与类 1.1java.lang.reflect Interface InvocationHandler Object invoke(Object proxy, Method method, Object[] args) throws Throwable 1.2 java.la
阅读全文
摘要:ClassNotFoundException 类没有找到 为 Class.forName("java.lang.Boolean"); 没有找到这个类文件的时候报错 InstantiationException 实例化异常, IllegalAccessException 非法访问异常class.new
阅读全文
摘要:在 java.lang.Object 类中定义了 getClass()方法, 因此对于任意一个 Java 对象, 都可以通过此方法获得对象的类型。 1.获得Class对象的三种方式 Class<?> c1 = Class.forName("java.lang.Boolean"); Class<?>
阅读全文
摘要:1.静态嵌套类 主要就是内部类前面有static 如果这样的类在外部可见可以初始化的方式为: Outer.Inner in = new Outer.Inner("wangfeng2"); 2.内部类 主要就是内部类前面没有static 如果这样的类在外部可见可以初始化的方式为: Outer.Inne
阅读全文
摘要:在linux环境下java一般安装在/usr/lib/jvm/这个目录比较合适。 需要配置的环境变量为JAVA_HOME,JRE_HOME,CLASSPATH;且需要修改PATH这个变量 修改/etc/profile这个文件,在文件的最后几行添加 export JAVA_HOME=/usr/lib/
阅读全文

浙公网安备 33010602011771号