Stampede

Stampede

Friday, October 22, 2021

CPT307 Week 1 Interactive Assignment 2

 CPT307

Week 1 Interactive Assignment 2

Java in 3 minutes

Definition

Java is an object-oriented, platform independent, high-level language that is interpreted by a Java Virtual Machine (JVM) and gains efficiency through use of just-in-time (JIT) compilers. 

Core Principles

 Since Java is an object-oriented language, it is influenced by the four principles of all object-oriented languages. These principles are:

Encapsulation:
The hiding of data implementation by restricting access. 
Abstraction:
The development of classes, objects, and types in terms of their interfaces and functionality.
Inheritance:
The concept of creating a base class that has attributes shared by all objects. It becomes the parent of subclasses that further delineate objects by shared attributes.
Polymorphism:
The model of multiple methods having the same name. Two types of polymorphism exist in Java at the high level.
Run-time (overridding) determined by the assigned dynamic type of object.
Compile-time (overloading) determied by the complier.

     4 major principles of Object-Oriented Programming | Raymond Lewallen (codebetter.com)


Java Design 

When we write Java code, java compiler (javac) converts it to byte code. Javac is included in Java Development Kit (JDK). The byte code is then converted to machine-specific instructions via Java Virtual Machine (JVM). Machine-specific instructions are then run on the computer by Java Runtime Environment (JRE). JVM = Execution of a Java program. Because Java is a platform-independent language, it needs a virtual machine environment (interpreter) to run, which is provided by JVM. So, JVM is used to run Java code. Whenever we run a Java program either using JRE or JDK, it goes to JVM to be executed. JRE = JVM + Library Classes. JRE provides environment to run Java programs on our machines. JDK = JRE + Development Tools. JDK is used to develop and run Java code. It is used by developers.

    Check out: 

https://hakaneroztekin.medium.com/java-in-a-nutshell-a-quick-review-guide-of-important-topics-of-java-962cbf62b761#:~:text=Properties%20of%20Java%201%20Object%20oriented%3A%20Java%20is,fly%20to%20native%20machine%20instructions.%20More%20items...%20


Install

Be aware that Java and its components are version sensitive. Once installed, updates should be applied.

The link below will help with the install on various operating systems.

How do I install Java ?



No comments:

Post a Comment