Java String chars() method

Java String chars() method


String chars() method added jdk 9.

This method returns a stream of int zero-extending the char values from this sequence. Any char which maps to a surrogate code point is passed through uninterpreted.

Java Program Example:


class StringChars{
public static void main(String args[]){
String str = "This is a String";
IntStream ins = str.chars().....// process with inStream api

}
}

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept