how to check if a char is a letter java
Character.isDigit(string.charAt(index)) //(JavaDoc) will return true if it's a digit
Character.isLetter(string.charAt(index)) //(JavaDoc) will return true if it's a letter
how to check if a char is a letter java
Character.isDigit(string.charAt(index)) //(JavaDoc) will return true if it's a digit
Character.isLetter(string.charAt(index)) //(JavaDoc) will return true if it's a letter
check if a string contains a charater java
javaCopyimport java.util.*;
import java.lang.*;
import java.io.*;
public class Example1 {
public static void main(String[] args) {
String str = "Character";
System.out.println(str.contains("h"));
System.out.println(str.contains("Char"));
System.out.println(str.contains("ac"));
System.out.println(str.contains("v"));
System.out.println(str.contains("vl"));
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us