检查参数是否包含变量或字符串

时间:2018-08-29 16:31:35

标签: java android android-studio

如何检查参数是否包含变量或字符串?例如:

    String text = "hello";

    //I want like this
    Demo(text);
    //But if he wrote like this give him error
    Demo("hello");

    public void Demo(String text) {

    }

0 个答案:

没有答案