Software Developers: JDK (Java SE Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
Administrators running applications on a server: Server JRE (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer.
"I named Java," said Kim Polese, then the Oak product manager and now CEO of Marimba Inc. "I spent a lot of time and energy on naming Java because I wanted to get precisely the right name. I wanted something that reflected the essence of the technology: dynamic, revolutionary, lively, fun. Because this programming language was so unique, I was determined to avoid nerdy names. I also didn't want anything with 'Net' or 'Web' in it, because I find those names very forgettable. I wanted something that was cool, unique, and easy to spell and fun to say.yin'yong
1254Java 教程
public static void main(String[] args) 是什么意思?
这是 Java 程序的入口地址,Java 虚拟机运行程序的时候首先找的就是 main 方法。跟 C 语言里面的 main() 函数的作用是一样的。只有有 main() 方法的 Java 程序才能够被 Java 虚拟机运行,可理解为规定的格式。
public class Test
{
public static void main(String []args)
{
System.out.println(args[0]);
System.out.println(args[1]);
System.out.println(args[2]);
}
}
1256Java的专业术语
在正式学习java并安装配置开发环境之前,有必要了解一些有关Java的专业术语:
JRE 与 Server JRE 区别, 以下是官网中的说明:
Software Developers: JDK (Java SE Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
Administrators running applications on a server: Server JRE (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer.
1255Java语言曾用名Oak
Java语言其实是有个曾用名的~叫Oak,而且起这个名字的时候也是很随心的,只是因为看到了窗口外的一颗橡树(只是因为面向窗外多看了你一眼~),所以就叫为Oak,但Oak这个名字已经被注册。最后他们以Java这个名字命名了这个语言,据说是Sun公司的程序猿们都很喜欢喝咖啡,而且对爪哇岛的一种咖啡印象很深,所以就有了Java这个经典的名字和咖啡的图标。
"I named Java," said Kim Polese, then the Oak product manager and now CEO of Marimba Inc. "I spent a lot of time and energy on naming Java because I wanted to get precisely the right name. I wanted something that reflected the essence of the technology: dynamic, revolutionary, lively, fun. Because this programming language was so unique, I was determined to avoid nerdy names. I also didn't want anything with 'Net' or 'Web' in it, because I find those names very forgettable. I wanted something that was cool, unique, and easy to spell and fun to say.yin'yong
1254Java 教程
public static void main(String[] args) 是什么意思?
这是 Java 程序的入口地址,Java 虚拟机运行程序的时候首先找的就是 main 方法。跟 C 语言里面的 main() 函数的作用是一样的。只有有 main() 方法的 Java 程序才能够被 Java 虚拟机运行,可理解为规定的格式。
对于里面的参数及修饰符:
1253Java 教程
Java 程序利用 main 函数中 args 参数实现参数的传递(传递空格处理)
用控制台编译运行:
注意:三个参数之间用空格隔开!
如果要输出空格怎么办?
只需要在包含空格的参数上,使用双引号 "" 即可。
实例运行:
1252Java 教程
String[] args 还有一种等价的写法: String... args
前者为数组形式, 后者为可变参数形式。
前者用得较多, 但是看到后者也应认识。