Posts

Showing posts from 2019

Classic Hello World in Java

Example of Classic "Hello! World" 1. Open any Code Editor (Eclipse is one of the most popular code editor) and create a Class by name FirstJavaProgram 2. If you are using Eclipse (either Neon, Oxygen, photon or  any other ..) , simply open Eclipse and go to File, then scroll down to  "New" and then scroll to "Project" and click on Project 3. In the "New Project" wizard Select "Java Project" 4.  In the "Create a Java Project" wizard, give a name of your project. Example: MyNewProject 5. Click "Finish" 6. A new empty Java Project is created which you can see in Package explorer on the left panel 7. Now, right click on the newly created Project and select "New" and scroll and click on "Class"in the wizard "Java Class".  Give a name of your java class. Example: FirstJavaProgram 8. In the bottom portion of the wizard, you will notice few check  boxes, you should select first check b...

Java Programming Language Introduction 1:-

What is a Variable? A variable is a named entity within a program that stores a value. A variable is fundamental to every program (in any language). Example: Char CarType [Sedan, Sptorts, Van, Electrical, Hybrid]                 CarType is a variable which has 5 array variable. Variable could be defined as a single                        variable or an array variable. What is a Type? Each variable within a Java program has a type. The type could be a primitive such as a number,a built-in class such a string, or a user-defined class. Char, int, number, float, string etc. A primitive data type: A char (for character), a byte (for a single 8-bit value), an int (for 32-bit integer), a short (for a 16-bit integer), a long (for a 64-bit integer), a float (single-precision floating point number) or a double (double-precision floating point number). A built-in Java class: Fo...