Java program to convert ASCI value to String


Program

package com.candidjava;

public class ConvertASCItoString
{

	public static void main(String args[])
	{
		int a[] = { 65, 120, 98, 75, 115 };
		String str = null;
		System.out.println("ASCI to String Coversion");
		for (int i : a)
		{
			str = Character.toString((char) i);
			System.out.println(i+"  =  "+str);
		}
	}

}

Output

ASCI to String Coversion

65    =  A

120  =  x

98    =  b

75    =  K

115  =  s




Related Post

Comments


©candidjava.com