Java tutorial
//package com.java2s; //License from project: Apache License import android.text.TextUtils; public class Main { public static String validateSignInForm(String email, String password) { if (isEmpty(email) || isEmpty(password)) { return "All fields are required"; } return null; } private static boolean isEmpty(String target) { return TextUtils.isEmpty(target); } }