hello world(参数可以这样写)

package test;

import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;

public class Test {
    public static void main(String[] args) throws IOException
    {


            String a = null;
            doHello(a="Hello world");//这里的参数是重点




    }
    private static void doHello(String string) {
        System.out.println(string);

    }

}

猜你喜欢

转载自blog.csdn.net/helloworlddm/article/details/79998176