What does plus sign does here in string?

Posted by Thanga on Stack Overflow See other posts from Stack Overflow or by Thanga
Published on 2012-10-19T10:55:18Z Indexed on 2012/10/19 11:00 UTC
Read the original article Hit count: 195

Filed under:
|

I would like to know, what is the difference between two statements, these may be simple

      String ss="myname";
      char[] charArray = ss.toCharArray();
      for ( char character : charArray )
         {
            System.out.println( +character );//Statements are here what does plus refers here:

            System.out.println( character ); //Statements are here:

     } 

I got the output for the code no errors but little doubt on how it works? What happens here?

If you would down vote let me know the reason please ,

Thanks in advance

© Stack Overflow or respective owner

Related posts about java

Related posts about string