Answers for "character is alphabet or not in java"

0

character is alphabet or not in java

class Main {
  public static void main(String[] args) {

    // declare a variable
    char c = 'a';

    // checks if c is an alphabet
    if (Character.isAlphabetic(c)) {
      System.out.println(c + " is an alphabet.");
    }
    else {
      System.out.println(c + " is not an alphabet.");
    }
  }
}
Posted by: Guest on March-28-2021

Code answers related to "character is alphabet or not in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language