/* * Program memakai metode copyValueOf */ package metode_copy_value_of; /** * @author fachrul */ public class Main { public static void main(String[] args) { char[] raychar={'I','n','f','o','r','m','a','t','i','k','a'}; for(int i=0;i<raychar.length;i++) System.out.print(raychar[i]); String kata1=String.copyValueOf(raychar); System.out.println(" " + " Dari karakter menjadi String = "+kata1); } }