QuickStart
Every program must begin with the class name, and the class must match the filename.
Hello world program
In above program, First class is created and file is saved as First.java same as class name.
Now, to run the program First.java, we need to compile it and it will run
To compile the java file, open cmd and locate the java file.
Type: javac filename.java
This will compile the java file and class file will be created
Now to run the java file.
Type: java filename
Comments
Post a Comment