Showing posts with the label java

Hello World | Java | lesson 2

 Java is an object-oriented language (OOP). Java objects are part of the so-called "Java class". "Hello world!" Let's see the Hello World first program which simply prints.  public class Main {   public static void main (String [] args) {                   System.out.println ("This is printed");     }  } The first line defines a class called Main. // Public class main{ In Java, every line of code that can actually be executed must be in a class. This line declares a class called Main, which is common, which means any other class can access it. It's not important right now, so don't worry. Right now we write our code in a class called Main and then talk about objects. Note that when we declare a class public, it must be expressed in a file of the same name (, otherwise we will get a compilation error. When running examples on the website, we don't use the common term because all of our code is written in one file. Next

Introduction to Java

  A little history of Java Java is a programming language created in 1991 by James Gosling of Sun Microsystems (Sun).  The goal of Java is to write a single program and run the program on multiple operating systems.  The first public version of Java (Java 1.0) was released in 1995. Sun Microsystems was acquired by Oracle Corporation in 2010.  Oracle now ships to Java. In 2006, Sun began offering Java under the GNU General Public License (GPL).  Oracle is continuing this project called OpenJDK. Over time, new and improved versions of Java have been released. The current version of Java is Java 1.8, also known as Java 8. Java is defined as a programming language, compiler, base library, and runtime (Java Virtual Machine). Java virtual machine.  The Java Platform is typically associated with the Java Virtual Machine and Java Basic Libraries. The Java language was created with the following attributes: Platform independent: Java programs use the JVM digest and do not directly access the op