(开发Java应用程序需要)(开发java应用程序需要什么软件)

(开发Java应用程序需要)(开发java应用程序需要什么软件)

今天开始为大家带来《Java面向对象程序设计》的学习。

今天我主要为大家讲解java的基础知识。主要内容有Java的重要性,Java程序的开发步骤和Java应用程序的基本结构。

Today we start to bring you Java Object Oriented Programming.

Today I will mainly explain the basics of java. The main contents are the importance of Java, the development steps of Java programs and the basic structure of Java applications.

01

Java的重要性

Java具有面向对象,与平台无关,安全,稳定和多线程等优良特性,是目前软件设计中优秀的编程语言。Java特别适用于Internet的应用开发,具备“一旦写成,处处可用”的特点。

1.Java语言和其他语言相比,最大的优势就是编写的软件能在执行码上兼容,能在所有的计算机上运行。这是因为Java可以在计算机的操作系统之上再提供一个Java运行环境(即运行Java程序的平台),该运行环境由Java虚拟机,类库以及一些核心文件组成,在平台提供的这个环境下,用Java编写的软件就能在其上运行。

2.目前,Java平台主要分为Java SE,Java EE和Java ME三个版本。

3.Java程序运行方法:虚拟机负责将字节码文件加载到内存,然后采用解释方法来执行字节码文件,即根据相应平台的机器指令翻译一句,执行一句。

Java is an excellent programming language for software design because it is object-oriented, platform-independent, secure, stable, and multi-threaded, etc. Java is especially suitable for Internet application development and has the feature of "once written, available everywhere".

Java language and other languages, the biggest advantage is that the software written in the implementation code compatible, can run on all computers. This is because Java can provide a Java runtime environment (i.e., a platform for running Java programs) on top of the computer's operating system, which consists of a Java virtual machine, class libraries, and some core files, and in this environment provided by the platform, software written in Java can run on it.

2. At present, the Java platform is mainly divided into Java SE, Java EE and Java ME three versions.

3. Java program running method: the virtual machine is responsible for loading the byte code file into memory, and then use the interpretation method to execute the byte code file, that is, according to the corresponding platform machine instructions to translate a sentence, execute a sentence.

02

Java程序的开发步骤

(开发Java应用程序需要)(开发java应用程序需要什么软件)

1.编写源文件:在Java源程序中,语句所涉及的小括号及标点符号都是在英文状态下输入的,而字符串里面的符号不受汉字字符或英文字符的限制。

2.保存源文件:如果源文件中有多个类,那么只能有一个类是public类;如果有一个类是public类,那么源文件的名字必须与这个类的名字完全相同,拓展名是.java;如果源文件中没有public类,那么源文件的名字只要和某个类的名字相同,并且扩展名是.java即可。

3.编译:字节码文件(.class文件):如果源文件中包含多个类,编译源文件将生成多个扩展名为.class的文件,在每个扩展名为.class的文件中只存放一个类的字节码。

4.运行:一个Java应用程序必须有一个类含有public static void main(String args【】)方法,称这个类是应用程序的主类。

1. Write the source file: In the Java source program, the parentheses and punctuation involved in the statement are entered in the English state, while the symbols inside the string are not restricted by Chinese characters or English characters.

2. Save the source file: If there are more than one class in the source file, then only one class can be public; if there is a class that is public, then the name of the source file must be exactly the same as the name of the class, and the extension is .java; if there is no public class in the source file, then the name of the source file just needs to be the same as the name of a class, and the extension is .java will do.

3. Compile: Bytecode file (.class file): If the source file contains more than one class, compiling the source file will generate more than one file with the extension .class, and only one class bytecode will be stored in each file with the extension .class.

4. run: a Java application must have a class containing public static void main (String args [ ]) method, said this class is the main class of the application.

03

Java应用程序的基本结构

(开发Java应用程序需要)(开发java应用程序需要什么软件)

Java应用程序有一个主类,即含有main方法的类,Java应用程序总是从主类的main方法开始执行。Java applications have a main class, i.e., the class containing the main method, and Java applications always start execution from the main class's main method.

参考资料:文字:百度;图片:微博;翻译:百度翻译

本文由LearningYard新学苑原创,部分图片文字来自网络,如有侵权请联系。

声明:我要去上班所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流,版权归原作者LearningYard学苑所有,原文出处。若您的权利被侵害,请联系删除。

本文标题:(开发Java应用程序需要)(开发java应用程序需要什么软件)
本文链接:https://www.51qsb.cn/article/m8ir9.html

(0)
打赏微信扫一扫微信扫一扫QQ扫一扫QQ扫一扫
上一篇2023-01-09
下一篇2023-01-09

你可能还想知道

发表回复

登录后才能评论