fork download
  1.  
  2. import java.io.*;
  3.  
  4. public class Test{
  5.  
  6. public static void main(String args[]){
  7. String Str1 = new String("ThisIsSecureKy4U");
  8.  
  9. try{
  10. byte[] Str2 = Str1.getBytes();
  11. System.out.println("Returned Value " + Str2 );
  12.  
  13. Str2 = Str1.getBytes( "UTF-8" );
  14. System.out.println("Returned Value " + Str2 );
  15.  
  16.  
  17. System.out.println("Unsupported character set");
  18. }
  19. }
  20. }
  21.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:4: error: class Test is public, should be declared in a file named Test.java
public class Test{
       ^
1 error
stdout
Standard output is empty