Print given sentence into its equivalent ASCII form | Java implementation for converting a string into it 's ASCII equivalent sentence ; Function to compute the ASCII value of each character one by one ; Driver function
import java . util . * ; import java . lang . * ; class GeeksforGeeks { static void ASCIISentence ( String str ) { int l = str . length ( ) ; int convert ; for ( int i = 0 ; i < l ; i ++ ) { convert = str . charAt ( i ) ; System . out . print ( convert ) ; } } public static void main ( String args [ ] ) { String str = " GeeksforGeeks " ; System . out . println ( " ASCII ▁ Sentence : " ) ; ASCIISentence ( str ) ; } }