I i-chi-go Forum Veteran Joined Apr 10, 2018 Posts 2,071 Reaction 994 Points 662 Dec 14, 2022 #1 hindi ko makuha mga paps, nauubusan ako ng idea e. pahelp naman mga paps Calling po sa mga expert dyan Attachments You do not have permission to view the full content of this post. Log in or register now.
hindi ko makuha mga paps, nauubusan ako ng idea e. pahelp naman mga paps Calling po sa mga expert dyan
P PHC-AlbertzZ Forum Veteran Elite Dec 14, 2022 #2 If no rule sa pagcode you can use this String method: Java: public class Main { public static void main(String[] args) { String out = swap("123456"); System.out.print("Out: " + out); } public static String swap(String str){ return str.charAt(str.length()-1) + str.substring(1, str.length() - 1) + str.charAt(0); } }
If no rule sa pagcode you can use this String method: Java: public class Main { public static void main(String[] args) { String out = swap("123456"); System.out.print("Out: " + out); } public static String swap(String str){ return str.charAt(str.length()-1) + str.substring(1, str.length() - 1) + str.charAt(0); } }
I i-chi-go Forum Veteran Dec 14, 2022 TS TS #3 PHC-AlbertzZ said: If no rule sa pagcode you can use this String method: Java: public class Main { public static void main(String[] args) { String out = swap("123456"); System.out.print("Out: " + out); } public static String swap(String str){ return str.charAt(str.length()-1) + str.substring(1, str.length() - 1) + str.charAt(0); } } Click to expand... awts medyo advance na ata yan paps, pero salamat parin
PHC-AlbertzZ said: If no rule sa pagcode you can use this String method: Java: public class Main { public static void main(String[] args) { String out = swap("123456"); System.out.print("Out: " + out); } public static String swap(String str){ return str.charAt(str.length()-1) + str.substring(1, str.length() - 1) + str.charAt(0); } } Click to expand... awts medyo advance na ata yan paps, pero salamat parin