public class StringPrograms { public static void main(String[] args) { String str = "123"; System.out.println(reverse(str)); }
public static String reverse(String in) { if (in == null) throw new IllegalArgumentException("Null is not valid input"); StringBuilder out = new StringBuilder(); char[] chars = in.toCharArray(); for (int i = chars.length - 1; i >= 0; i--) out.append(chars[i]); return out.toString(); }
public class StringPrograms { public static void main(String[] args) { String str = "123"; System.out.println(reverse(str)); }
public static String reverse(String in) { if (in == null) throw new IllegalArgumentException("Null is not valid input"); StringBuilder out = new StringBuilder(); char[] chars = in.toCharArray(); for (int i = chars.length - 1; i >= 0; i--) out.append(chars[i]); return out.toString(); }
}
#собеседование
BY JavaRocks
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.