Complete Learning Materials for Self-taught Java Programming

In this tutorial, we will discuss the complete material for learning the java programming language independently, where the complete material for learning java programmers is made for friends who want to learn self-taught and have a complete discussion.

What is Java Programming? 

Java is a programming language that can be run on various computers including mobile phones. The java programming language was originally created by a developer named James Gosling, who at that time joined the Sun Microsystems company, which is currently part of Oracle and was released in 1995. The java programming language adopted many of the syntax found in C and C ++ but with syntax. a simpler object model and support for negligible bottom-level routines. Applications made based on the Java programming language are generally compiled into a form of p-code (bytecode) and of course can be run on various Java Virtual Machines (JVM).

The Java programming language is a programming language that is more general / non-specific (universally useful), and is specifically designed to take advantage of the minimum possible implementation dependencies. Because of its functionality that allows Java applications to run on several different operating system stages, Java is also known by the slogan, "Write once, run where play on words". Currently, Java programming is a programming language that can be said to be the most popularly used, and is widely used in the development of various types of application software or applications.

History of Java Programming

Java programming language is a programming language that was born from The Green Project, which has been running for 18 months, from the beginning of 1991 until this summer, namely 1992. The project has not used Oak which is the version of the name. The project was supported by Patrick Naughton, James Goling and Mike Sheridan. As well as nine other programming languages ​​from the Sun Microsystems company. One of the results of this project is the Duke mascot created by Joe Palrang.

The Java programming language was developed in 1990 by engineers Sun and James Gosling as a programming language that can act as the brain for smart devices (interactive TV as well as a versatile stove). Of course, Gosling was not satisfied with the results he got when writing programs using the C ++ programming language, another programming language, so he went into exile in his office and wrote a new programming language to better suit his needs.

Gosling named his new programming language Oak, the name of a tree he could see from his office window; he then named the tree Green, and later changed the name to the name Java, derived from Java coffee, which was widely consumed by the creators of this programming language. This programming language later became part of Sun's strategy to raise millions of dollars when interactive TV became a multi-million dollar industry. This is still not the case at this point, but something completely different happened to the new programming language that was created by Gosling.

Coincidentally the World Wide Web has become very popular and there are many advantages that make the Gosling language well used and suitable for use in projects and tools for adaptation to the world of the Web. Sun developers designed a way for programs to run safely from web pages and chose a new name that would catch and accompany the java programming language.

Although the Java programming language can be used for many things, such as a website that provides the interface that users need to attract attention on an international scale. A developer who places a Java program on a web page can directly access the entire planet or what is commonly known as "Web-surfing". Since the Java programming language was the first technology to offer such capabilities, Java programming became the first computer language to receive stellar treatment in the public media.

Java programming language is a programming language for various purposes, of course or can be said (universally useful), a programming language that is simultaneous, class-based, and object-oriented, which is specifically designed to have as few dependencies as possible in its use and application. This is meant to allow a developer or application developer to “compose once, run anyplace” (WORA), which means that code that runs on one stage certainly doesn't need to be recompiled for elsewhere. Java is currently one of the most popular programming languages ​​because many people use it, especially for customer worker website applications, with 10 million users.

Initial Version

The initial version of the Java programming language in 1996 was already a released version so it was named Java Version 1.0. This version of Java includes many of the original standard packages which continue to be developed in later versions:
  • java.lang: Used for class elements base.
  • java.io: Used for input and output classes, including the use of files.
  • java.util: Used for complementary classes such as data structure classes and calendar classes.
  • java.net: Used for the TCP / IP class, which allows communicating with other computers using the TCP / IP network.
  • java.awt: Base class for a user interface (GUI) application
  • java.applet: Basic class of interface applications that are intended to be applied to web browsers.
Next, we will discuss the advantages and disadvantages, please refer to the discussion below.

Advantages of Java Programming

There are several advantages to the Java programming language compared to other programming languages, namely
  1. Multiplatform. The main benefit of Java is that it tends to run at multiple stages of the PC / framework, as shown by the write-once, run anywhere guide. With this advantage the developer only needs to create a Java program and assemble it (convert it from human understood language to machine language / bytecode) once and the results can be run at various stages without changes. This benefit allows Java bundling programs to run in conjunction with the top Linux frameworks but run well on Microsoft Windows. The stages that have been maintained to date are Microsoft Windows, Linux, Mac OS and Sun Solaris. This is because each framework uses its own program (which can be downloaded from the Java website) to parse the bytecode.
  2. OOP (Object Oriented Programming - Object Oriented Programmer), Java is a programming language with the idea of ​​OOP. The 2017-01-18 chronicle at the Wayback Machine. Where the program is built lies in Object. Applications that work with the OOP idea consist of interrelated articles.
  3. Complete Class Library, Java is famous for its total libraries / libraries (assortment of programs that are remembered for Java programming) which are very easy for developers to use to assemble their applications. This library fulfillment is combined with the presence of a very large group of Java people who are incessantly creating new libraries to meet all the needs of application enhancement.
  4. The style of C ++, has punctuation like the C ++ programming language so that it has attracted many C ++ developers to move to Java. Currently there are a lot of Java clients, mostly C ++ developers who have moved to Java. Schools in the United States are also starting to switch to Java for new students because it is easier for students to understand and can be helpful for those who are not learning PCs.
  5. Programmable junk, has the use of executive office memory so that the developer does not need to do board memory directly (as is the case in the commonly used C ++ language).
After knowing the benefits of the Java programming language, we will then talk about the shortcomings of the Java programming language. If it's not too much trouble, mention the explanation below.

Disadvantages of Java Programming

There are several drawbacks to this Java programming language compared to other programming languages.
  • Create once, run anywhere - There are still some contradictions between stages. For J2SE, for example SWT-AWT connect which was not recently chip-chip in Mac OS X.
  • Simple to describe. Decompilation is a way of converting finished code to source code. This is conceivable because Java code is a bytecode that holds several undeniable level language credits, for example, class name, strategy, and type of information. The exact same thing happened to the Microsoft .NET Platform. As a result, the calculations the program uses will be more difficult to cover up and simpler to confiscate / think about.
  • Lots of memory usage. The utilization of memory for Java-based projects is much more important than undeniable dialect level like C / C ++ and Pascal (more explicitly, Delphi and Object Pascal). Usually this isn't a problem for people using the latest technology (since the memory patterns introduced are cheaper), but a problem for people who really want to go to war with PC machines over 4 years.
Then we will see an illustration of making a program from the Java programming language, see the explanation below.

Example of Java Program Code

An example of a Hello world program written in the Java programming language is as follows:
// Hasil "Hello, world!" dan keluar
public class HelloDunia {
   public static void main(String args[]) {
       System.out.println("Hello Dunia!");
   }
}

Types of Data Types

Before discussing the types of information in Java, it is better to talk about understanding the types of information themselves. What is a type of information?

Quoting from wikipedia (data type):

"An information type or basic type is a grouping of information that tells the compiler or translator how the developer plans to make use of that information."

Interpretation:

"The type of information or sometimes basically" type "is a collection of information to be able to tell compilers or translators how developers need to handle that information."

In basic terms, type of information is the way we suggest PCs to classify information depending on what the PC gets.

For example, suppose I have information as numbers. In order to be understood by the Java compiler this information must be stored in predefined factors so that it can store numbers such as numbers, floats, and multiple types of information. Or vice versa if the information must be stored in the form of text or words, it tends to be stored in the String information type.

Types of Data Types in Java

Comprehensively, there are 2 sets of information types in the Java language, namely specific basic information types (primitive information types) and complex information / object types (non-crude information types).

Types of rough information, consisting of the types of information that accompany:
  • Number information type: The information type for the whole number such as 5, 7, or 48.
  • Buoy / Multiple information type: The type of information for a fractional number, for example, 3.14, 5.55, or 0.00024.
  • Boolean information type: Information type that contains a valid or false value.
  • Singe information type: Information type for 1 character, for example, 'a', 'Z' or '%'.
Types of non-crude information, including:
  • String information type: The type of information for the character set, for example, "Andi", "Duniailkom", or "Learn Java".
  • Type of exhibition information: Type of information for other comparable collections of information.
  • Type of information object: An extraordinary type of information that can hold information, including having its own capacity / technique.

Use of the Java programming language

Revealing from w3schools, Java can be used for several things, including:
  1. portable applications (especially Android)
  2. work area applications
  3. web application
  4. web worker and worker application
  5. game
  6. data set association
Apart from the above, there are many different occupations in Java. This shows that the language is a programming language that is widely used.

Java Essential Components

In Java programming, of course, it has several components that can support it to make it easier when we create projects with Java, here are the 3 most important components in Java programming.

JDK
The Java Development Kit (JDK) is a middle segment in Java. This section provides each instrument, executable, partner expected to order, troubleshoot, and run Java programs.

JVM
The Java Virtual Machine (JVM) is regularly viewed as the core of the Java programming language. When running Java programs, the JVM is responsible for converting the byte code into more explicit code.

JRE
Java Runtime Environment (JRE) is a JVM execution. The JVM provides the opportunity to run Java programs.

Java Framework example

Looking at programming in the PC world, structure is a natural term. Basically, a structure can be described as a piece of programming that is set up and ready to use at any time.

As a rule, structures are created from MVC (Model, View, Controller). All things considered, in this MVC you can collect information, interactions, and result elements of an application.

If you want to create a website using the Java programming language, here are the most used web systems for Java.

Vaadin Framework
Vaadin Framework enjoys the benefits that it uses code much like Java SE source code.

If you are new to Swing, you should have no trouble adapting to the Vaadin Framework.

MVC spring
First presented in 2003, the Spring Framework is an open source system that takes advantage of built-in object-based programming.

Apart from ITU, this one system allows developers to work with various advancements and outside libraries.

Java Server Pages (JSP)
JSP is perhaps the most well-known system for creating web applications. For someone who is accustomed to using Java, it will definitely not experience any challenges so far.

As far as execution, the JSP will generally have good execution because it has been loaded into a servlet - a Java class that web workers are prepared to run.

Comment

Comments on programming are notes that can be written by the programmer for various reminders or explanations when reading a program code.
  • Comment 1 line = Represents a single line mark, using the // sign
  • Multi-line comments = comments that are more than one line using the /*….*/
The following is an example of comments in the java programming language:
// this is a 1 line comment
/ *
Meanwhile this is a comment
a few lines
* /
Note: words contained in certain comments will not be executed by the compiler.

Arithmetic Operators

The following are the operators that of course you often encounter in Java programming.
  • '+' = Addition
  • ‘-‘ = reduction
  • ‘*’ = Multiplication
  • ‘/’ = Division
  • ‘%’ = Remainder for (modulo)
This programming language certainly adopts a lot of syntax in the C ++ programming language, if you are familiar with the C ++ programming language, of course the admin feels that you will learn it easier.

Java Variables

In Java programming, of course, we will recognize three types of variables:
  • Local Variable = is a variable that can be used by program blocks that wrap it or are contained in it. For example, for a method, etc.
  • Class Variables (Static Variables) = is a variable that belongs to the class (indicated by the statistical keyword), meaning that it can be used immediately without having to create an object.
  • Instance Variable = is a variable that belongs to the object, meaning that you must create an object before you can use that variable.

Java Modifiers

Basically there are two types of modifiers in Java, namely:
  • Access Modifiers - default, public, private, protected
  • Non-access Modifiers - final, abstract
where for the discussion this time the admin will save and discuss in the next article about the deficiencies and differences of the two types of modifiers.

Conclusion

We have learned many things about Java programming, of course, this programming language is one of the most popular languages ​​to date. Where there are many advantages of Java programming, and there are also important components to make it easier to make programs, namely JDK, JVM and JRE.

Maybe that is what the admin can say in this article that can easily provide benefits and lessons for readers, thank you for visiting and reading this article regarding Complete Self-taught Java Programming Materials.


By: Muhammad Rizal Supriadi

0 Response to "Complete Learning Materials for Self-taught Java Programming"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel