… • The Java compiler translates Java source code into a special representation called bytecode • Java bytecode is not the machine language • Another software tool, called an interpreter (Java Virtual Machine), translates bytecode into machine language and executes it • Java is considered to be architecture-neutral
• Environments for developing Java software: o NetBeans o Eclipse o TextPad o BlueJ o IntelliJ o www.tutorialspoint.com/compile_java_online.php • Though the details of these environments differ, the basic compilation and execution process is essentially the same
that a programmer takes Write a program (instructions to a computer) Compile the program i.e., translate it to machine code Execute/Run the program i.e., tell the computer to execute each instruction Fix typos, grammar errors Fix logical error (semantic)
01 • Lab 01 will be to install an IDE (Integrated Development Environment) for Java • IDE = Text Editor + Java Compiler + Java Virtual Machine + Fancy Tools
Program Structure public class TheClassName { } public void theFirstMethodName() { } public void secondMethodName() { } // instructions go here // instructions go here // variables go here // variables go here // variables go here
Words • The Java reserved words: abstract boolean break byte case catch char class const continue default do double else extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws transient true try void volatile while