01_Java program structure and program meaning

 Hello, I'm Mr.ChooCAI.

Java program structure and program meaning

If there is anything missing in the description, please feel free to point it out. We will always listen with a learning attitude.

In this lecture, I will explain one thing

1.     Basic meaning and content of the program

 


As shown in the figure above, a set of commands is called a program, and a set of commands according to language type is called a Java or C# program.

Programming can be thought of as the act of giving commands to the computer through commands according to the language type (java, python, c….)


If we explain programming in more detail, just as Koreans have to learn English to communicate with Americans, we need to learn computer language to communicate with computers. After learning C language, you will be able to talk to a computer. And just like English has grammar, in order to communicate with a computer in C language, you need to study simple grammar (data types, input/output methods, control statements, threads, classes, etc...) to be able to communicate naturally. (First button to talk to machine!)

So far, we have talked about programming in general. From now on, I will start explaining about the JAVA program.




As shown in the figure above, it can be seen that the JAVA program is executed by separating the JVM, which is an intermediate medium for code writing and execution. JVM exists for each OS (window, linux, mac) and helps to execute java code regardless of OS. This was a great advantage when developing JAVA. However, in the case of new languages ​​(python, go…), you can see that these functions are provided.



If you check the parts other than the JVM in more detail, it converts the Java source, that is, the written code, into byte code through the Java Compiler. And it has a structure to find and refer to the packages needed in the written code from the Class Library and execute them through the JVM. Here, you can see that Java is an object-oriented language. I think you are still not familiar with the term object-oriented. Don't worry, I'll explain more in the Classes and Methods part later!



In order to understand how the codes delivered as bytes are executed, we will explain the internal configuration of the JVM. If you explain in order from the top left, it is a function that cleans up unused memory among the memories in the runtime memory through the garbage collector. Class Loader is the part that loads the required class, that is, the package. The Execution Engine is the part that processes incoming commands and executes them. This structure was recognized in a very efficient way when the language was developed at the time, making it a popular language. Runtime DataAreas is the memory space allocated by the OS to run the program, and it is necessary to learn more about the Runtime DataAreas configuration. Please refer to the picture below.



Because Runtime Data Areas are efficiently divided as shown in the figure above, memory can be used efficiently.

The characteristics of the JAVA language at the time of development can be summarized as follows.

  1. It is an object-oriented language.
  2. Easy to learn.
  3. Runs regardless of which operating system (OS).
  4. Memory management is not done by developers.
  5. Dynamic and thread support.
  6. Supports network programming and distributed processing.

Thanks for reading this long post. Next, we will summarize the syntax of the Java language and upload it. If there is anything missing, please feel free to let me know. I will always listen. From the next post, we will cover the syntax of java program and practice through github.

Comments