Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static char getFirstChar(String text) {
        if (text != null && text.length() > 0) {
            return text.charAt(0);
        }
        return (char) 0;
    }
}