All,
While I'm programming the Android SMTP code,I met a confused problem
with code similar as the following:
    String str= "\0" username "\0" passwrd;
After executed the code, I found "\0" is intepreted as two
undisplayable char.
Then I executed the folloing debug code:
    String sZero = "\0";
    int iLen = sZero.length();
    int iValue1 = (int)sZero.charAt(0);
    int iValue2 = (int)sZero.charAt(1);
    Log.w("ZERO", "Zero String, Lenth=", iLen, " value1=", iValue1, "
value2=", iValue2);
What I get in screen is :
    Zero String, Length=2 value1=65533 value2=65533.

Really confuse me, why "\0" become [65533,65533] in my program?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to