Strings
reverse
package com.company;
import java.util.Scanner;
public class Main {
public static String reverse(String str){
String reversed = "";
for (int i = 0; i < str.length(); i++)
reversed = str.charAt(i) + reversed;
return reversed;
}
public static void main(String[] args) {
String str = "hello";
System.out.println(reverse(str));
}
}JUnit
version 2
JUnit on array
Exercise - Permutations
version 2
Exercise: Remove words from String
solution
Exercise: Calculate the sum of the numbers appear in a given string
Exercise: Convert Int to Roman

Solution
Last updated