What to be discussed? • We are going to discuss on 1. Comments 2. Starting a Java Program 1. Importing classes 3. Formatting the output
Comments • Comments are description about the features of a program. • Means whatever we write in a program should be described using comments. • Thus readability and understandability of a program will be more. • There are 3 types of comments in java.
Comments // This is my comment of one line. /* This is a multi line comment. This is line one This is line two of the comment.*/ /** description about a class*/ Class code /** description about a method */ Method code
Comments • API Document: – The API document is generated from the .java program is similar to a help file where all the features are available with their descriptions. – To create an API document, we should use a special compiler called javadoc compiler.