importjava.io.*;publicclassTest{publicstaticvoidmain(String args[]){StringStr1=newString("Welcome to Tutorialspoint.com");try{StringStr2=newString(Str1.getBytes("UTF-8"));System.out.println("Returned Value "+Str2);Str2=newString(Str1.getBytes("ISO-8859-1"));System.out.println("Returned Value "+Str2);}catch(UnsupportedEncodingException e){System.out.println("Unsupported character set");}}}