1 BASE64Encoder base64=new BASE64Encoder();2 String
encoderStr=base64.encode(string.getBytes("utf-8"));3 System.out.println(en...
分类:
其他好文 时间:
2014-06-07 05:24:28
阅读次数:
211
1 class A{ 2 static int num = 1; 3 public static
void Display(){ 4 System.out.println( num ); 5 } 6 } 7 8 class B extends A{ 9
...
分类:
其他好文 时间:
2014-06-04 22:47:14
阅读次数:
219
实例代码如下: String str = null; String uSelectDate =
String.valueOf(str);
System.out.println("==================uSelectDate:"+uSelectD...
分类:
编程语言 时间:
2014-05-30 09:39:52
阅读次数:
402
一、方法传不固定值的用法 public void Test(int a,Person
...Persons) { for(Person p:Persons){ System.out.println(p.age); } }
好处是不用去构造数组Persons...
分类:
编程语言 时间:
2014-05-29 21:53:36
阅读次数:
337
publicstaticvoidmain(String[]argv){try{
System.out.println(“中文”);//1 System.out.println(“中文”.getBytes());//2
System.out.println(“中文”.getBytes(“GB2312″...
分类:
编程语言 时间:
2014-05-29 20:24:06
阅读次数:
424
我这个是窃取我们公司同事的劳动成果,分享出来,看谁用到就帮助谁了,嘿嘿!!!一:取出字符串中的汉字(只保留汉字)的正则表达式:
Stringstr="sa汉字e3中国人r#|c";System.out.println(str.replaceAll("[^\u4E00-\u9FA5]",""));二:...
分类:
其他好文 时间:
2014-05-29 19:21:11
阅读次数:
306
接口:interface Worker{ public void
dowork();}清洁工:被装饰者,节点流class Clean implements Worker{ public void dowork(){
System.out.println("搞清洁"); ...
分类:
编程语言 时间:
2014-05-28 03:18:38
阅读次数:
325
SUPER可调用父类的构造方法,但要注意默认调用和参数调用。同时,在继承类时,可以用SUPER调用其它非构造方法哟。class
Test extends Object{ public Test(){ System.out.println("Test1 First thing");...
分类:
编程语言 时间:
2014-05-26 18:50:48
阅读次数:
325
@Override public int onStartCommand(Intent intent,
int flags, int startId) {
System.out.println("---------->>onStartCommand2"); re...
分类:
移动开发 时间:
2014-05-26 17:33:56
阅读次数:
228
package chapter1;public class Demo1 { public
static void main(String[] args) { System.out.println("Hello World!"); /*...
分类:
编程语言 时间:
2014-05-25 13:56:17
阅读次数:
229