Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter the char:");
        String str = buff.readLine();
        for (int i = 0; i < str.length(); ++i) {
            char c = str.charAt(i);
            int j = (int) c;
            System.out.println("ASCII OF " + c + " = " + j + ".");
        }
    }

}