ICT 143-2 Data Structures 01
ICT 143-2 Data Structures 01
Structures
and Algorithms
• The JVM is responsible for executing the byte codes and responsible for fundamental
capabilities of java.
• Byte codes are platform independent therefore will not depend on a particular
hardware platform.
• Those source files are then compiled into .class files by the javac compiler.
• FileName .class file does not contain code that is native to your processor; it
instead contains bytecodes — the machine language of the Java Virtual Machine
(Java VM).
• The java launcher tool then runs your application with an instance of the Java
Virtual Machine.
Java Environment Setup
Java Environment Setup
• Set the environment variable for Windows
• ◦ Assuming you have installed Java in c:\Program Files\java\jdk directory -
• ◦ Right-click on 'My Computer' and select 'Properties'.
• ◦ Click the 'Environment variables' button under the 'Advanced' tab.
• ◦ Now, alter the 'Path' variable so that it also contains the path to the Java
• executable. Example, if the path is currently set to 'C:\WINDOWS\
SYSTEM32',
• then change your path to read 'C:\WINDOWS\SYSTEM32;c:\Program
• Files\java\jdk\bin'.
Popular Java Editors
• Notepad - On Windows machine, you can use any simple text editor like
Notepad
• NetBeans - A Java IDE that is open-source and free which can be downloaded
from https://www.netbeans.org/index.html
• Eclipse - A Java IDE developed by the eclipse open-source community and can
be downloaded from https://www.eclipse.org/
Visual Studio Code
Visual Studio Code
• Java in Visual Studio Code
First Java Program
}
Comments
• Syntax
• modifier - It defines the access type of the method, and it is optional to use.
•nameOfMethod - This is the method name. The method signature consists of the method name and the
parameter list.
•Parameter List - The list of parameters, it is the type, order, and number of parameters of a method. These are
optional, method may contain zero parameters.
•method body - The method body defines what the method does with the statements
Method call