Java Programming Part 6: What is Java?



--------------------------------------------------------------------------------------------------------------------
Java is a high-level programming language originally developed by Sun Micro-systems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and Linux. 
--------------------------------------------------------------------------------------------------------------------

 
---------------------------------------------------------------------------------------------------------------------
Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
---------------------------------------------------------------------------------------------------------------------


----------------------------------------------------------------------------------------------------------------------
What are the main areas where Java is used?

Android Apps
if you want to see where Java is used, you are not too far away. Open your Android phone and any app, they are actually written in Java programming language
---------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------
Software Tools
Many useful software and development tools are written and developed in Java e.g. Eclipse, InetelliJ Idea and Netbeans IDE.
-------------------------------------------------------------------------------






---------------------------------------------------------------------------------
The Java compiler javac transforms a .java source file into a .class file that is written in Java bytecode, which is the machine language for an imaginary machine known as the Java Virtual Machine.
---------------------------------------------------------------------------------

Java Programming Part 5: Compiler and Interpreter



-----------------------------------------------------------------------------------------------------------------------
Compiler is a program that compiles source code into executable instructions that a computer can understand.
-----------------------------------------------------------------------------------------------------------------------



-------------------------------------------------------------------------------
Interpreter is a program that executes programming code directly. Interpreter can convert a source code, usually on a step-by-step, line-by-line and unit-by-unit basis into machine code.

Example of interpreted languages : 

Python
JavaScript 
Pearl
---------------------------------------------------------------------------------


Java Programming Part 4: High Level Language


---------------------------------------------------------------------------------
allows us to write computer code using instructions resembling everyday spoken language (for example: print, if, while) which are then translated into machine language to be executed.
--------------------------------------------------------------------------------


--------------------------------------------------------------------------
They are considered high-level because they are closer to human languages.
Examples of High-level Languages:
C
C++
JAVA
BASIC
COBOL
PASCAL
PHYTON
ASP.net
VB.net

------------------------------------------------------------------------------------------------------------------



-----------------------------------------------------------------------------
The problem is that the computer doesn't understand high level language,  so we need a way to convert it to machine code.High level language must use interpreter, compiler or translator to convert human understandable program to computer readable code (machine code).
-------------------------------------------------------------------------------

Java Programming Part 3: Assembly Language



---------------------------------------------------------------------------------
Binary Notation(1 & 0)  is very hard to understand , that is why Assembly Language was developed. 
--------------------------------------------------------------------------------------------------------------------------


 --------------------------------------------------------------------------------
Assembly language is a a programming language that consists of instructions that are mnemonic codes for corresponding machine language instructions.

Ex. 

DATA SEGMENT     MESSAGE DB "HELLO WORLD!!!$" ENDSCODE SEGMENT      ASSUME DS:DATA CS:CODESTART:       MOV AX,DATA      MOV DS,AX      LEA DX,MESSAGE             MOV AH,9      INT 21H      MOV AH,4CH      INT 21H      ENDSEND START
--------------------------------------------------------------------------------------------------------------------------





---------------------------------------------------------------------------------
The problem is that the computer doesn't understand the assembly code, so we need a way to convert it to machine code, which the computer does understand.Assembly language programs are translated into machine language by a program called an assembler. 
---------------------------------------------------------------------------------


---------------------------------------------------------------------------------
An assembler is a program that takes basic computer instructions and converts them into a pattern of  bits ( 0 & 1) that the computer runs to produce result
---------------------------------------------------------------------------------


-----------------------------------------------------------------------------------------------------------------
 Assembly language is easier for a human to read and can be written faster, but it is still much harder for a human to use if you don’t know exactly the internal structure of computer.
----------------------------------------------------------------------------


Java Programming Part 2: What is Machine Language?


---------------------------------------------------------------------------------
Machine language is a collection of binary digits or bits that the computer reads and interprets.It  is the only language understood by computers.

Machine Language:
“0110101100101000” 
---------------------------------------------------------------------------------


-----------------------------------------------------------------------------
Computers cannot understand human languages, unless there is software to translate it to something the CPU can understand.
-----------------------------------------------------------------------------


Java Programming Part 1 : What is Programming Language?



Learn the basics of Java programming language language syntax and object-oriented programming. Gain practical experience by designing, writing, compiling, and executing simple Java programs.

Things you may need to learn before writing a program in Java





¡A computer program is a step by step instructions that tells the hardware what to do. 
Examples of hardware are

Microsoft Office such as : 
1. MS Word
2. MS Access
3. MS Excel

Operating System such as : 
1. Windows xp, 7, 8, 10
2. Mac OS X
3. Android OS
4. iOS


------------------------------------------------------------------------
Software , programs , and applications are all the same 
------------------------------------------------------------------------

--------------------------------------------------------------------------
Without software, computer is useless
--------------------------------------------------------------------------

--------------------------------------------------------------------------------

A programming language is a set of rules that provides a way of telling a computer what operations to perform

Programming languages can be used to create computer programs. 
The term programming language usually refers to high-level languages, such as C, C++, COBOL, FORTRAN, Java, C-Sharp, Pascal, ASP.Net & VB.net.
---------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Types of Programming Language are: 

1. High Level Languages
2. Low Level Languages 
3. Assembly Language
4. Machine Language
------------------------------------------------------------





How to make a 2x2 Picture in Photoshop



Most people when applying for a new passport, they will look forward to the professional photographer, but then this can be expensive. Now, if you know how to make use of image-editing software-Photoshop and a home printer, you can produce a good quality photos that meet the official standards and requirements.

Here, let me share some simple tips on using Photoshop to create your own 2x2 size photo.


STEP 1
Go to “File” and select “Open”. Choose the picture and open the selected image.


STEP 2

Select the “Crop Tool”, change the width to 2in and height 2in, Resolution: 300 pixel/inch.US passport sizes is 2” by 2”.



STEP 3

Go to option bar  below the menu bar, select size and resolution, set the width and height to 2x2(width and height). Press OK, save the crop preset. Move the crop handle until you get the desired size.  Press Enter




!:  Try to add stroke around the cropped picture. It is easy to cut the 2x2 if it has an outline




STEP 4
Create a new document. Go to “File “, select “New”. Set the preset size to US Paper: Choose Letter size, Mode RGB color and click “OK” This will create a new layer.



Step 5
Select the move tool, drag the image to the other tab or left click the tab of the image, drag the image to the new document or project.




Final Output



Another way to copy 


Hold “ALT”key and using the “move tool” to drag the image to the new layer. Repeat it twice and now you get 2 images in one layer. You almost done.