Features and Keywords in Java 
Tags: java, beginners, tutorial, programming
Published: 2021-01-27 05:48:32

<h2>Features and Keywords in Java</h2>
In this tutorial, we will learn about the key <a href="https://usemynotes.com/features-of-java/">features of Java</a>. We will also learn why Java is so powerful as a programming language as well as the Keywords (Reserved Words) used in Java.
<h2>Features of Java</h2>

<h3>Simplicity</h3>
<p>Java is a simple programming language compared to other programming languages like JavaScript or Ruby. It has a strong syntax which makes it consistent, easy to understand and readable at the same time.</p>
<h3>Familiarity</h3>
<p>Java is one of the most familiar programming languages in the world. It’s concepts somewhat matches the concepts of other object-oriented programming languages like C#, Python, etc. It is also a commonly used programming language in the industry.</p>
<h3>Platform-Independent</h3>
<p>Java generates ‘bytecode’ after the compilation of a program. This bytecode is platform-independent in nature. It can be carried to any other operating system which supports JVM and executed without caring much about the operating system.</p>
<h3>Object-Oriented</h3>
<p>Everything that is created in Java is in the form of objects. Java uses objects to communicate with other objects in a program. These objects require memory to operate. These objects are self-contained memory blocks that contain runtime data. When not in use, these objects are destroyed by the Garbage collector.</p>
<h3>Secure</h3><p>Java is known for its security. Programs written in Java are well encrypted and secured by Java. Also, it does not support explicit use of pointers which are used in C and C++. This is a huge benefit as it prevents direct access to memory.</p>
<h3>Robust</h3><p>Java can be used to create robust programs and software. Java has strong error handling capability and memory management features that can be implemented to create an error-free and memory-efficient software.</p>
<h3>Architecture Neutral</h3>
<p>Programs compiled in Java are architecture-neutral. These compiled programs or ‘bytecodes’ does not depend on the architecture of the system. A system can run Java programs without considering its architecture until it supports JVM. In the end, all the architectural stuff is handled by the JVM.</p>
<h3>Multithreaded</h3>
<p>Java uses multiple threads to execute multiple operations or tasks simultaneously. Each thread can be considered as an individual execution path that can do a specific task without waiting for other tasks to complete. Threads can be created, executed, interrupted, and destroyed as needed through programming.</p>
<h3>High Performance</h3>
<p>Java programs are compiled and executed with high performance. Rather than interpreting all the code line by line, Java bytecodes are interpreted and compiled by the JIT compiler in runtime which makes them fast and efficient.</p>
<h3>Portable</h3><p>As Java bytecodes are platform-independent, they are also lightweight and portable. These bytecodes can be brought to any other operating system that has JVM and then executed.</p>
<h3>Distributed</h3><p>Java enables programs to get processed and executed in multiple distributed environments. These distributed components can then be connected to each other to accomplish a goal.</p>
<h3>Dynamic</h3><p>Java has dynamic memory allocation to allocate memory, dynamic memory management and garbage collection. It supports dynamic loading and linking.</p>
<h2>Keywords in Java</h2>
There are several reversed keywords in Java that have a special meaning for the Java compiler. These keywords cannot be placed inappropriately in a Java program. Also, these keywords cannot be used as identifiers* in a Java program. All the available keywords in a program should be typed in lowercase only.
<table>
  <tbody>
    <tr>
      <td>abstract</td>
      <td>assert</td>
      <td>boolean</td>
      <td>break</td>
    </tr>
    <tr>
      <td>byte</td>
      <td>case</td>
      <td>catch</td>
      <td>char</td>
    </tr>
    <tr>
      <td>class</td>
      <td>continue</td>
      <td>default</td>
      <td>do</td>
    </tr>
    <tr>
      <td>double</td>
      <td>else</td>
      <td>enum</td>
      <td>extends</td>
    </tr>
    <tr>
      <td>final</td>
      <td>finally</td>
      <td>float</td>
      <td>for</td>
    </tr>
    <tr>
      <td>if</td>
      <td>implements</td>
      <td>import</td>
      <td>instanceof</td>
    </tr>
    <tr>
      <td>int</td>
      <td>interface</td>
      <td>long</td>
      <td>native</td>
    </tr>
    <tr>
      <td>new</td>
      <td>package</td>
      <td>private</td>
      <td>protected</td>
    </tr>
    <tr>
      <td>public</td>
      <td>return</td>
      <td>short</td>
      <td>static</td>
    </tr>
    <tr>
      <td>strictfp</td>
      <td>super</td>
      <td>switch</td>
      <td>synchronized</td>
    </tr>
    <tr>
      <td>this</td>
      <td>throw</td>
      <td>throws</td>
      <td>transient</td>
    </tr>
    <tr>
      <td>try</td>
      <td>void</td>
      <td>volatile</td>
      <td>while</td>
    </tr>
    <tr>
      <td>const**</td>
      <td>goto**</td>
    </tr>
  </tbody>
</table>
<ul>
  <li>Identifiers are the names given to a variable or a function to identify them in a program.</li>
  <li>Keywords <strong>const</strong> and <strong>goto</strong> are not used anymore.</li>
</ul>