Java????÷????
???????????? ???????[ 2015/4/7 13:55:08 ] ????????Java ??????? ?÷? ???
???????????д???
????PrintWriter out=new PrintWriter(
????new OutputStreamWriter(new FileOutputStream(...)??"UTF-8"));
????try{
????out.print("Hello");
????out.print(42);
????out.println("world!");
????}finally{
????out.close();
????}
????Printwriter??????????ú?????????????Java?????????????????????????????????????C??????????
??????System.out??????????print()??println()???????????????
???????????????????????????????UTF-8?????ò??????????
?????ο???java.io.PrintWriter??java.io.OutputStreamWriter??
???????????Defensive checking?????
????int factorial(int n){
????if(n<0)
????throw new IllegalArgumentException("Undefined");
????else if(n>=13)
????throw new ArithmeticException("Result overflow");
????else if(n==0)
????return 1;
????else
????return n*factorial(n-1);
????}
??????????????????????????????С??????????????????Щ??????
?????????????????????????п???????????????????????С????????е???????????????????????????????????????????
??????????????
????int findIndex(List<String>list??String target){
????if(list==null||target==null)
????throw new NullPointerException();
????...
????}
?????????????????????????null?????????????????????
???????????????????
????void frob(byte[]b??int index){
????if(b==null)
????throw new NullPointerException();
????if(index<0||index>=b.length)
????throw new IndexOutOfBoundsException();
????...
????}
???????????????????????????????硣????????????
???????????????????
????void frob(byte[]b??int off??int len){
????if(b==null)
????throw new NullPointerException();
????if(off<0||off>b.length
????||len<0||b.length-off<len)
????throw new IndexOutOfBoundsException();
????...
????}
???????????????????????????磬??off????????len?????????????硣????????????
??????????????
????????????
????//Fill each element of array'a'with 123
????byte[]a=(...);
????for(int i=0;i<a.length;i++)
????a[i]=123;
????????????????????????
????Arrays.fill(a??(byte)123);
?????ο???java.util.Arrays.fill(T[]??T)??
?????ο???java.util.Arrays.fill(T[]??int??int??T)??
?????????????Χ??????????
????????????
????//Copy 8 elements from array'a'starting at offset 3
????//to array'b'starting at offset 6??
????//assuming'a'and'b'are distinct arrays
????byte[]a=(...);
????byte[]b=(...);
????for(int i=0;i<8;i++)
????b[6+i]=a[3+i];
????????????????????????
????System.arraycopy(a??3??b??6??8);
?????ο???java.lang.System.arraycopy(Object??int??Object??int??int)??
?????????????С
??????????????????????
????//Make array'a'larger to newLen
????byte[]a=(...);
????byte[]b=new byte[newLen];
????for(int i=0;i<a.length;i++)//Goes up to length of A
????b[i]=a[i];
????a=b;
??????????????С???????
????//Make array'a'smaller to newLen
????byte[]a=(...);
????byte[]b=new byte[newLen];
????for(int i=0;i<b.length;i++)//Goes up to length of B
????b[i]=a[i];
????a=b;
????????????????????????
????a=Arrays.copyOf(a??newLen);
?????ο???java.util.Arrays.copyOf(T[]??int)??
?????ο???java.util.Arrays.copyOfRange(T[]??int??int)??
??????4?????????packing???????int
????int packBigEndian(byte[]b){
????return(b[0]&0xFF)<<24
????|(b[1]&0xFF)<<16
????|(b[2]&0xFF)<<8
????|(b[3]&0xFF)<<0;
????}
????int packLittleEndian(byte[]b){
????return(b[0]&0xFF)<<0
????|(b[1]&0xFF)<<8
????|(b[2]&0xFF)<<16
????|(b[3]&0xFF)<<24;
????}
??????int???Unpacking????4?????
????byte[]unpackBigEndian(int x){
????return new byte[]{
????(byte)(x>>>24)??
????(byte)(x>>>16)??
????(byte)(x>>>8)??
????(byte)(x>>>0)
????};
????}
????byte[]unpackLittleEndian(int x){
????return new byte[]{
????(byte)(x>>>0)??
????(byte)(x>>>8)??
????(byte)(x>>>16)??
????(byte)(x>>>24)
????};
????}
???????????????????????????>>>????λ???а????packing?????????????????????????>>????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????