Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Tujuh
- {
- public static void main(String[] args)
- {
- String str="Teknik Informatika UTS";
- char[] arraystr=str.toCharArray();
- System.out.println("String : " +str);
- System.out.println("String Baru [toCharArray]: ");
- for (int i=0; i<arraystr.length ; i++)
- {
- System.out.println(arraystr[i]);
- }
- System.out.println("String Baru [getChars]: ");
- char[] getstr=new char[10];
- str.getChars(5,13,getstr,0);
- for (int i=0; i<getstr.length ; i++)
- {
- System.out.println(getstr[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment