Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.widget.EditText;

public class Main {

    public static int getInt(EditText et) {
        String string = getString(et);
        if (string == null || string.length() == 0) {
            return 0;
        }
        return Integer.valueOf(getString(et));
    }

    public static String getString(EditText et) {
        return et.getText().toString().trim();
    }
}