随笔分类 -  java

摘要:传统的io流是阻塞式的,假如多条线程请求同一个数据,会导致阻塞,如下图api说明: 阅读全文
posted @ 2019-05-29 11:09 考虑到五岁的限制 阅读(1765) 评论(0) 推荐(0)
摘要:shiro 的配置 阅读全文
posted @ 2018-08-25 13:15 考虑到五岁的限制 阅读(4128) 评论(0) 推荐(0)
摘要:package com.aarony.test; import java.io.IOException; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmExcepti... 阅读全文
posted @ 2018-06-20 21:46 考虑到五岁的限制 阅读(182) 评论(0) 推荐(0)
摘要:DSE AES 阅读全文
posted @ 2018-06-20 21:34 考虑到五岁的限制 阅读(134) 评论(0) 推荐(0)
摘要:package com.aarony.test; import java.io.IOException; import java.security.MessageDigest; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class DigestDemo { /** * ... 阅读全文
posted @ 2018-06-20 21:22 考虑到五岁的限制 阅读(181) 评论(0) 推荐(0)
摘要:package cn.my.demo;//设计一个监听器public class Demo2 { public static void main(String[] args) { Person p=new Person(1001,"张三"); p.refisterL... 阅读全文
posted @ 2015-06-19 17:42 考虑到五岁的限制 阅读(903) 评论(0) 推荐(0)
摘要:Object o=new Object();其中有两个受保护的方法: 1、protected void finalize() 2、protected Object clone() 1、System.out.println( o );//输出的时候默认调用的是该对象的toString() 方法 2、toString() public String toString() { return getClass().getName() + "@" + Integer.toHexString(hashCode()); } Integer.toHexString(hashCode()): 阅读全文
posted @ 2013-12-16 13:58 考虑到五岁的限制 阅读(265) 评论(0) 推荐(0)
摘要:// 浏览器提交的数据是000110011(码表中对应的《编码》 )等东西。// 浏览器以什么《码表》打开浏览器(而空中浏览器使用的编码是: 这条语句控制的),那么就以什么《码表》提交数据。 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { test1(request, response); } //get提交时候的乱码处理 private ... 阅读全文
posted @ 2013-10-30 19:07 考虑到五岁的限制 阅读(441) 评论(0) 推荐(0)
摘要:import java.util.Arrays;class Demo5{ public static void main(String [] args) { String name1="hello world"; String name2="hello world"; String name3=new String("hello world"); String name4=new String("hello world"); System.out.println( name1==name2 );//true ... 阅读全文
posted @ 2013-09-19 22:30 考虑到五岁的限制 阅读(288) 评论(0) 推荐(1)
摘要:class A{ public A(){ System.out.println("测试!!!!!!!!!!!"); }}class Demo19 extends A{ { x=7;//代码块初始化 System.out.println("hello world!测试代码块的执行顺序!AAAAAAAAAAA"); } public int x=1;//这里不会初始化变量值 只会声明变量 public int y=2;//这里不会初始化变量值 只会声明变量 public Demo19(){ //... 阅读全文
posted @ 2013-09-10 18:52 考虑到五岁的限制 阅读(738) 评论(0) 推荐(0)
摘要:/* final class A{ public final void eat(){ System.out.println("测试"); } } */class A{ }class B extends A{ //测试 public void eat(){ System.out.println("不能重写父类的方法"); } static final double PI=3.1415926; public void test( final int x,int y){ //x=12; 这里是... 阅读全文
posted @ 2013-09-10 18:45 考虑到五岁的限制 阅读(458) 评论(2) 推荐(0)
摘要:import java.util.Arrays;import java.util.HashSet;import java.util.Set;class Demo20{ public static void main(String[] args) { //int [] arr={1,2,3,3,4,4,4,4}; int [] arr={4,2,3,3,4,4,4,4}; //arr=delArr(arr); arr=delArrByHash(arr); //test(arr); System.out... 阅读全文
posted @ 2013-09-09 01:06 考虑到五岁的限制 阅读(883) 评论(0) 推荐(0)