你能否在技术上调用主要方法中的任何字符串[]? [英] Could you technically call the string[] anything in the main method?
问题描述
main
方法的头部是 public static void main(String [] args)
你能用技术来取代你想要的任何东西吗?另外,为什么参数是一个数组?
The header for the Could you technically replace "args" with anything you want? Also, why is the parameter an array? dont break the start point of the app
这篇关于你能否在技术上调用主要方法中的任何字符串[]?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! args
方法中参数的名称。你可以将它重命名为任何你想要的。 JVM不需要知道 的参数是什么;只有 type , String []
很重要。 点的应用程序
pre $ code static static main(String [] whateverYouNeed)
main
method ispublic static void main (String[] args)
args
is just a name for the argument in a method. You can rename it to whatever you want. The JVM doesn't need to know what the argument is named; only the type, String[]
, is important. static void main(String[] whateverYouNeed)