forum

home / developersection / forums / how to deal with checked exception (unsupportedencodingexception) that can never occurs?

How to deal with checked exception (UnsupportedEncodingException) that can never occurs?

Anonymous User 2523 16-Nov-2014

I am trying transform a string to UTF-8 encoding. But the compilation fails because some code "throws UnsupportedEncodingException".

String s = "1,2,3,4";

String smsext = new String(s.getBytes(),"UTF-8");

how to solve this ?


Updated on 17-Nov-2014

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By