Check prefix ignoring the case

Report a typo

Write a program that checks if a given string starts with the prefix "J" ignoring the case.

The program should output true or false.

Sample Input 1:

Java

Sample Output 1:

true

Sample Input 2:

Kotlin

Sample Output 2:

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

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// start coding here
}
}
___

Create a free account to access the full topic