Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] args) {
        String numbers = "1234567890";
        for (int i = 0; i < numbers.length(); i++) {
            if (Character.isDigit(numbers.charAt(i))) {
                System.out.println(numbers.charAt(i) + " is a number.");
            } else {
                System.out.println(numbers.charAt(i) + " not a number.");
            }
        }
    }
}