In this lecture, we will be creating a Java program. We will do this
without using an IDE and believe me, many developers do not know
how to do it. So this is actually very interesting. Here is our outline:
First of all, we will create a Java program using a simple text editor,
for example Notepad on Windows. After compiling our program, we
want to run it to see the output and we will also do this using the
Command Window. Java code will be executed whenever we run
our Java program. Alright so this program will print a string. We
need to use the println method so first of all we will access the
system class. After that, we will give a name to the file. Remember
that the name of the file should be the same as the name of the
class. The Java c command can be used to compile a Java file, so
in this case the file is called main Dota Java. We will use the Java
command then we will leave a space and you will type the name of
the Java file that we want to compile. After we press enter, the main
Dota Java file will be compiled and a new file will be created over
here.
Java programs can be run on any computer, so suppose you have a
Java bytecode file. If you bring any machine that has the Java
Virtual Machine installed, the virtual machine can execute this Java
byte code fine. So this is why we can run our program on any