search
HomeJavajavaTutorialJAVA programming basics

JAVA programming basics

Aug 29, 2023 pm 02:41 PM

JAVA programming basics

JAVA is a powerful, portable and highly secure programming language created by James Gosling in 1991 at a company called Sun Microsystems, Inc. Its official name is OAK, which was renamed JAVA by Sun Microsystems in 1995. The company has been acquired by Oracle Corporation. It is a general-purpose programming language and an object-oriented programming language. JAVA is a modern widely used programming language. It contains various protection measures designed to prevent program runtime crashes such as garbage collection - invalid addresses, array and string bounds checks, no pointer arithmetic, exceptions and interfaces that do not run to incorrect method addresses.

JAVA version

The functions of JAVA vary from version to version. JAVA has three different forms or versions -

Java Standard Edition (JSE)

It is a computer platform that allows us to run programs. It can be used to create and distribute portable code servers and desktop setups. It uses JAVA as its main programming language. It belongs to the JAVA software platform family.

It provides all libraries and APIs, including java.lang, java.net, java.math, java.util, java.io, etc.

Java Enterprise Edition (JEE)

This is a collection of requirements surrounding Java SE (Standard Edition). It is used for making large programs that run on servers and handle large amounts of traffic and complex situations.

Java EE is mainly used in e-commerce, accounting, financial transaction systems and other fields

The translation result of

Java Micro Edition (JME)

is:

Java Micro Edition (JME)

It is used for computing applications in small devices such as boxes, mobile phones and home appliances. It is an object-oriented version. It has great security and built-in protocols.

Apps created this way are portable and can also take advantage of the device's native capabilities.

Types of JAVA applications

Java is the most popular programming language, so it has countless applications. Here are some of the applications:

Enterprise Applications

Java is the first choice for developers to create applications. It is a popular platform with various features such as providing APIs and scripting runtime environment. Also includes web services and applications. It is widely used by banking, finance and accounting departments.

Simply put, it is an application distributed in an environment called an enterprise application

Web Application

It is used to make web applications, and is used by web applications. It provides extensive support to developers for creating web applications. Any type of application can be created with these technologies. It consists of simple coding and high security.

Used to create applications for education, social security, insurance, health departments, small communities, etc.

Mobile App

It is considered the official program for creating mobile applications. It works with programs like Android Studio and Kotlin. Its operation relies on the Java Virtual Machine (JVM), while Android runs class files on the Dalvik Virtual Machine (DVM).

This depends on the concept of object-oriented programming. These files are assembled into Android application packages (APKs).

Game Application

It has the support of open source 3D engine. It is a widely used application in the modern era. It is considered a programming language mainly used for gaming applications.

It is used for creating gaming applications. It consists of long coding and takes time, and lacks garbage collection, but this problem can be solved by using the version of this application.

JAVA Platform

The Java platform is a set of tools that can help us easily create various applications and provide high-security services. These applications use the Java programming language to create code to run the application efficiently.

Much of the Java platform has been developed to ensure that Java functions can run equally without any difficulty. It is a collection of libraries, compilers, virtual machines, and all other components.

It also provides additional libraries when the program needs them. It consists of Java development kit, Java language compiler, Java runtime environment, just-in-time compiler, etc.

Features of JAVA

Java is a commonly used programming language used to create different types of applications. Here is a list of some of these applications:

  • Direct and well known

Java is an easy language to understand, create and learn. It consists of clear, concise and basic syntax. Java does not provide pointer overloading or operator overloading.

  • Object-oriented

It consists of at least one class and object. It provides everything as an object, so it contains some data and behavior

  • powerful

It uses garbage collection as a powerful management system. The way it handles and exceptions makes it more efficient and robust, helping developers create applications easily.

  • Safety

It runs without explicit programs in a virtual machine, making it a highly secure programming language.

  • Platform independent

Java provides platform-independent functionality to its users. It thus offers the promise that code written in Java can run on any machine.

OOP (Object-Oriented Programming System)

By breaking a large problem into smaller objects, it can be solved using an object-oriented programming system. In object-oriented programming, we use objects and classes to develop programs. Objects make program development easier.

The Chinese translation of

Class

is:

Class

It acts as a prototype or template for the data members and methods of the containing object. It is an instance of an object. It is used to define class objects.

grammar

class ClassName{
   // class body
}
The translation of

Object

is:

Object

An object has unique identity, behavior and properties. It is used to define object classes. The state of an object can be defined by data fields and their values.

grammar

ClassName object = new ClassName();

abstract

Abstraction is a unique technique used to hide unnecessary information in a program. Used to define abstract classes in programs.

Syntax of abstract classes

abstract class A{}

Syntax of abstract methods

abstract void printStatus();// no method body and abstract

Encapsulation

It is used to combine data and functions into a form or entity. A Java bean is a fully encapsulated class.

grammar

<Access_Modifier>class<Class_Name{
   private<Data_Members>;
   private<Data_Methods>;
}

inherit

It is used to expand keywords to create inheritance. We can get all the features of other classes through this mechanism.

grammar

class Subclass-name extends Superclass-name {
   // methods and fields
}

Polymorphism

It manifests itself in many ways. Simply put, we can perform an action in multiple ways, which is polymorphism.

grammar

class A{}
Class B extends A{}

in conclusion

JAVA is an object-oriented programming language used to develop different types of applications. It has three main versions, namely Java Standard Edition, Java Enterprise Edition and Java Micro Edition. Java is an easy-to-understand language that provides developers with high-security options. It is also a platform independent language.

The above is the detailed content of JAVA programming basics. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:tutorialspoint. If there is any infringement, please contact admin@php.cn delete
How to ensure that @Scheduled timing tasks are executed only once in Spring Boot multi-node environment?How to ensure that @Scheduled timing tasks are executed only once in Spring Boot multi-node environment?Apr 19, 2025 pm 04:21 PM

How to avoid repeated execution of timed tasks in SpringBoot multi-node environment? In Spring...

In object-oriented programming: Are attributes and states really equivalent?In object-oriented programming: Are attributes and states really equivalent?Apr 19, 2025 pm 04:18 PM

Deeply discussing properties and states in object-oriented programming. In object-oriented programming, the concepts of properties and state are often confused, and there is a subtle between them...

How to deal with a number overflow error when connecting to Oracle database in IDEA?How to deal with a number overflow error when connecting to Oracle database in IDEA?Apr 19, 2025 pm 04:15 PM

How to deal with digital overflow errors when connecting to Oracle database in IDEA When we are using IntelliJ...

How to use @ResultType annotation correctly in MyBatis?How to use @ResultType annotation correctly in MyBatis?Apr 19, 2025 pm 04:12 PM

When studying the MyBatis framework, developers often encounter various problems about annotations. One of the common questions is how to use the @ResultType annotation correctly...

How to use natural language processing technology to efficiently query personnel data?How to use natural language processing technology to efficiently query personnel data?Apr 19, 2025 pm 04:09 PM

Methods of using natural language processing technology to query personnel data In modern enterprises, the management and query of personnel data is a common requirement. Suppose we...

Under SpringBoot multi-data source configuration, what is the reason why database access is slow during the day and fast during the night?Under SpringBoot multi-data source configuration, what is the reason why database access is slow during the day and fast during the night?Apr 19, 2025 pm 04:06 PM

Database access performance problem in Springboot project multi-data source configuration This article aims at using Atomikos for multi-data source configuration in a Springboot project...

NoClassDefFoundError appears after Java project is packaged into JAR: How to troubleshoot JDK version compatibility issues?NoClassDefFoundError appears after Java project is packaged into JAR: How to troubleshoot JDK version compatibility issues?Apr 19, 2025 pm 04:03 PM

When packaging a Java project into an executable JAR file, it encounters the problem of NoClassDefFoundError. Many Java developers may...

How to analyze the cracking process of IntelliJ IDEA and find the lib or class responsible for registration?How to analyze the cracking process of IntelliJ IDEA and find the lib or class responsible for registration?Apr 19, 2025 pm 04:00 PM

Regarding the analysis method of IntelliJIDEA cracking in the programming world, IntelliJ...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool