Love of big letters

Report a typo

Implement a method that takes a String message as an argument. The method translates all letters having an even index to uppercase (index 0 is considered even) and returns the result.

It's guaranteed that input strings will not be empty.

Sample Input 1:

computer

Sample Output 1:

CoMpUtEr

Sample Input 2:

programming

Sample Output 2:

PrOgRaMmInG

Sample Input 1:

computer

Sample Output 1:

CoMpUtEr
Write a program in Java 17
import java.util.Scanner;

class EvenUpperCase {

public static String upperEvenLetters(String message) {
// write your code here
return null;
}

// Don't change the code below
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String message = scanner.next();

System.out.println(upperEvenLetters(message));
}
}
___

Create a free account to access the full topic