Please help me solve this problem:
I have two lines for email id and password like
String name = " xyz@gmail.com "; String pass = "abc";
I encode these two into a Base64 string, for example
String encoded_name = new String(Base64.encode(name.getBytes(), 0)); String encoded_pass = new String(Base64.encode(pass.getBytes(), 0));
, and I need to combine these two encoded lines with space, e.g.
String merge = encoded_name + " " + encoded_pass;
I checked this line on the console
System.out.print("Concatenate string= " + merge);
but in the console I get the result in two lines, such as
11-18 00:25:29.898: INFO/System.out(1244): Merge= eHl6QGdtYWlsLmNvbQ== 11-18 00:25:29.908: INFO/System.out(1244): YWJj
Why this happens, the result is unexpected for me, why it does not print on one line. please help me solve this.
thanks
source share