What dya know on casting
Casting hay chuyển kiểu là một kĩ thuật thường gặp nhưng cần có 2 điểm cần chú ý:
+ Bạn có thể thực hiện chuyển kiểu giữa các primitives typesNếu bây giờ tôi có một kiểu Int là i = 1. Tôi muốn chuyển nó sang kiểu String để thực hiện việc gán nó vào một chuỗi. Bạn không thể làm:
+ Bạn có thể thực hiện chuyển kiểu giữa các đối tượng dựa trên quan hệ kế thừa
Bạn có thể dùng lớp bao Wrapper class để thực hiện việc chuyển đổi:int i=10;
String st= new String();
st=(String)i;
hoặc một tiểu xảo tận dụng khả năng tự chuyển đổi khi kết hợp 1 chuỗi với một số làString st = Integer.toString(i);
string = String.valueOf(i);
st = ""+i;

2 Comments:
Very nice site! kihei honeymoon suite change game save hentai http://www.pennsylvania-vacation.info/Travel4.html http://www.high-cholesterol-7.info/Buicklucernegasmileage.html Butalbital and miscarriage
That's a great story. Waiting for more. Harlingen online advertising farmers insurance agent las vegas Inexpensive toronto laptops 2001 ford focus zx3 accessories Multitrip insurence switzerland englishclostridium botulinum tcheupdjian malpractice http://www.proactiv-solutions-9.info/malpractice.html Lexapro take at night http://www.buy-ritalin-methylin2c-methylphenidate.info/bed-queen-sheet-size-water.html Cheap air flights cheap airline flight warsaw portable toilet camping
Post a Comment
<< Home