Java tutorial
//package com.java2s; public class Main { private final static String[] mSupportedNetworkTypes = new String[] { "wifi", "3gnet", "#777" }; public static boolean isNetworkTypeSupported(String networkType) { for (String networkItem : mSupportedNetworkTypes) { if (networkItem.equalsIgnoreCase(networkType)) { return true; } } return false; } }