Quantcast
Channel: BlogoSfera » length
Viewing all articles
Browse latest Browse all 61

Get actual length of the defined String in Java

$
0
0

I’ve defined String as String s = "\\"; int length = s.length(); // returns 1 System.out.println(s); // prints only one "\" How can I get it’s size equal to 2 ? UPD: The problem is not in getting exactly 2-sized String. I need to get the count of source characters which I’ve defined my String […]

The post Get actual length of the defined String in Java appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 61

Trending Articles