Java Tutorialedit

first lesson

من سلسلة : Java Tutorialedit

Why Java?

Java is like the variety of your favorite food that is tasty (easy to code) and healthy (secure and robust)!

 

Besides the fact that Java is among the top programming languages of 2020 and perhaps will remain so for at least a decade, Java has nailed it in almost every domain you can think of!

As Java is secure and multi-threaded, it is perfect for Banking and transaction management services. E-commerce shops and billing software have their logic written in frameworks based on Core Java. Mobile OS like Android uses Java APIs. Stock market algorithms are based out of Java. And most recently, all the big data - the humongous data is dealt with like a breeze with Java. In fact, the MapReduce framework of Hadoop is written in Java. Java along with other frameworks like Spring makes for a robust combination to sort implementation dependencies and write server-side applications in Finance and IT domains.

What is Java Programming?

Java is a write-once, run-anywhere programming language developed by Sun Microsystems. It is similar to C and C++ but a lot easier. You can combine Java with a lot of technologies like Spring, node js, Android, Hadoop, J2EE, etc… to build robust, scalable, portable and distributed full-fledged applications. Java also promotes continuous integration and testing using tools like Selenium.

History of Java

Java was originally developed by James Gosling with his colleagues at Sun Microsystems during the early 1990s. Initially, it was called a project ‘Oak’ which had implementation similar to C and C++. The name Java has later selected after enough brainstorming and is based on the name of an espresso bean. Java 1.0, the first version was released in 1995 with the tagline of ‘write once, run anywhere’. Later, Sun Microsystems was acquired by Oracle. From there, there has been no looking back. The latest version of Java is Java 12 released in March 2019.

Features of Java

Java offers plenty of attractive features -

  • Platform independent language
  • Rich standard library making it easy to code. You can create a whole stand-alone application using Java.
  • Java supports automatic memory allocation and deallocation (called garbage collection).
  • It offers great performance as Java supports multithreading and concurrency, thus making it a highly interactive and responsive language.
  • Secure and simple

To know more about the features of Java, do read this nice article.

What is the Java platform?

You must have heard a lot about Java as a programming language. But, do you know it is also a ‘platform’? Java platform is a software-only platform quite different from traditional platforms like Windows, Mac, Linux or Solaris. The former runs on top of the hardware of the latter platforms. Java programs go through Java Virtual Machine, that converts the byte code into native code, thus making the program run just any device! This means you don’t need individual machine-specific compilers for the Java code to run. This is why Java is called a platform too. Java programming language is different from the Java platform. Java programming language helps you build applications. What you write in Java programming language is developed and run with the help of an existing collection of programs and tools collectively called a Java platform. Java platform consists of the JDK, JVM, and JRE.

There are four Java platforms of the Java programming language –

  • Java SE (Java Platform, Standard Edition)
  • Java EE (Java Platform, Enterprise Edition)
  • Java FX
  • Java ME (Java Platform, Micro Edition)

While stand-alone applications can be built on the Java SE platform, most of the world wide web (internet) depends on Java EE. Java ME is for applications on small devices (like mobile phones).

 

Components of Java

There are three main components of Java - JVM, JDK, and JRE.

JDK or Java Development Kit is where the developers write their code and run it through the JRE or Java Runtime Environment.

How is the code translated? That’s through the Java Virtual Machine (JVM). With JVM, any code is written in Java (or any other language) can be translated to Java bytecode. Any machine can then implement this code based on the Operating System. JVM resides inside the JRE along with the java packages (libraries).

JDK JVM JRE
JRE + development tools like interpreter(class loader), compiler (javac), jar files (package and archive) and javadocs. The abstract machine where the java bytecodes are executed. Consists of a specification document that describe JVM implementation, the actual implementation program and the instance of JVM (run-time) where you can run your main program. Physical implementation (Runtime instance) of JVM. It contains the library packages and support files that JVM uses for running a program.

 

 

 

 

 

 

 

If you have a system, you can try a few things as you read this article. To practice, you need to install JDK (Java Development Kit) and JRE (Java Runtime Environment) on your local system. To download the latest version, click here.

You can then set up an IDE on your system and work on the concepts that we will learn. Eclipse is a good IDE that I use, whenever I need to run a program on Java. It is easy to set up and does not bother you much. You can either download Eclipse or Easy Eclipse. Easy Eclipse is a lighter version of eclipse with fewer features. There are many more IDE’s, check them out here.

If you don’t want to do any of this right now, but just want to read about Java, that’s fine! Just read on, grasp the concepts and then start coding whenever you want!

And oh, this is a good certification course available for Java (Java Certification Program.), which you will love taking up after you learn the basics!

Are you all setup?

Before we jump into coding, let us familiarize ourselves with a few terminologies –

Every java program is a collection of different types of objects that are defined by a class or interface. This is the basic structure –

. . .

هل أعجبك المحتوى؟

التعليقات

test comment

لاضافة سؤال او تعليق على الدرس يتوجب عليك تسجيل الدخول
تسجيل الدخول

دروس اخرى مشابهة