Convert ASCII to String conversion Using Java

 Posted On  | Yashwant Chavan 

In this tutorial we will simply learn how to convert ASCII values to equivalent String values.

Convert ASCII to String conversion Using Java

Refer below code having ASCII values array which we are going to convert into corresponding char value then transform those chars to string values.

package com.technicalkeeda.app;

public class AsciiToString {
  
    public static void main(String[] args) {
        
       int numbers[] = {65,66,67,97,98,99};
      
        String str = null;
      
        for (int i: numbers) {
            str = Character.toString((char) i);
            System.out.println(str);
        }
    }
  
}

Output

A
B
C
a
b
c


© technicalkeeda.com 2017

 |  Find us on Google+ |  Rss Feed

Loaded in 0.0441 seconds.