?? helloarg.java
字號:
import java.text.MessageFormat;
import java.text.DateFormat;
import java.text.Format;
import java.util.ResourceBundle;
import java.util.Locale;
import java.util.Date;
public class HelloArg
{
public static void main(String[] args)
{
Locale currentLocale = null;
if (args.length == 2)
{
currentLocale = new Locale(args[0] , args[1]);
}
else
{
currentLocale = Locale.getDefault();
}
ResourceBundle bundle = ResourceBundle.getBundle("MyResource" , currentLocale);
String msg = bundle.getString("msg");
System.out.println(MessageFormat.format(msg , "yeeku" , new Date()));
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -