A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

Character Extraction

String Character Extraction method in Java

String Character Extraction method in Java?

The String Character Extraction: The String class offers a number of ways in which characters can be extracted from a String object.

  • charAt()

  • getChars()

  • getBytes()

  • toCharArray()



The charAt() method returns the character at the specified index in a java string.
The getChars() method is used in java for copying String characters to an Array of chars.
The getBytes() method is used in java that encodes a given String into a sequence of bytes and returns an array of bytes.
The java string toCharArray() method is used in java that converts the given string into a sequence of characters.












LEARN TUTORIALS

.

.