2

I want to convert a charsequence to String value,I use the following code for that

   string passwordTxtValue;
   passwordTxtValue = passwordTxt.getText().toString();
      System.out.println(""+passwordTxtValue);

But i am not getting the value,how can i resolve this.

4

2 回答 2

1

Your value get converted correctly, but the java method println() won't work in Android

于 2013-01-08T10:32:16.330 回答
1

In Android System.out.println() gets redirected to LogCat and printed using Log.i(). In java you have System.out.println() instead of that you can use Android Log class in Android for the same purpose. And you can see the output in the Logcat. And one upperhand to see in the Logcat is you can get Stack Traces of any uncaught Exceptions.

于 2013-01-09T03:32:48.790 回答