A. What is Java?
Java is a programming language created by James Gosling. Java's syntax is similar to C/C++ because Java is heavily inspired by these two languages. Java is designed to be general-purpose and fully embraces the OOP (Object Oriented Programming) paradigm.
founder java: James Gosling
B. Java Programming Functions
1. Game Development
Many popular mobile, computer, and video games are built using Java. In fact, modern games that integrate advanced technologies such as machine learning or virtual reality are also built with Java technology.
2. Cloud Computing
In 1995 Sun Microsystems created the slogan “Write Once and Run Anywhere” for Java. The slogan shows that Java is a programming language that can run across platforms. Java became a suitable programming language for decentralized cloud-based applications. This is because cloud providers use Java to run programs on the various platforms on which they are based.
3. Big Data
The next function of the Java programming language is to process large amounts of complex and real time data.
4. AI (Artificial Intelligence) Development
Java is the right programming language for developing artificial intelligence (AI) applications. One of the reasons is because Java is a powerhouse for machine learning libraries. One example of Java's usefulness in the AI world is in natural language processing and deep learning where Java shows good stability and speed.
5. Internet of Things
Today, Java is used to program sensors and hardware on edge devices that can connect to the internet independently.
C. Structure in java programming (for beginners)
Every programming language has a different structure and syntax writing rules. Java is a programming language developed from the C language and will certainly follow the C writing style. When you first see a Java program, you might wonder. “What is this? What is that?”
Well, to start your steps as a java progamer, you must understand the structure of java first.
The structure of a Java program is generally divided into 4 parts:
1. Package Declaration
2. Import Library
3. Class Section
4.Main Method
5.Output
Let's discuss each structure
1. Package Declaration
Package is a folder that contains a set of Java programs. Package declaration is usually done when creating a large program or application.
image: example of a package in Java
2. Import Library
In this section, we import the libraries needed in the program. Library is a set of classes and functions that we can use in making programs. As a beginner, we recommend using import java.util.Scanner, this serves as entering data in the output (Result)
image: example of a import Section in Java
3. Class Section
The class block is opened with curly braces "{ " and then closed or terminated with "}". Inside the class block, we can fill it with methods or functions as well as variables. In the example above, there is a main() method.
image: example of a import Section in Java
4. Main Method
The main() method or main() function is the program block that will be executed first. This is the entry point of the program. The main() method is mandatory. Otherwise, the program will not be executed.
Example of main() method:
image: example of main method
5. Output
the output is the result of your programming. to display the output, you can press Shift+6 or right-click and press run file.
image: example of main method
After knowing the structure of java programming, it is time for you to become a programmer in the java language. well here we will show examples of programs in Java. You can click on the page “simple java programming”or clink Below: