JavaDoc Comments
JavaDoc Comments
Data Types
Various data types used in Java are byte, short, int, long, char, float, double and
boolean.
EXAMPLE
class DatatypeDemo
byte a=10;
short b=10*128;
long d=10000*1000*128;
double e=99.9998;
char f='a';
boolean g=true;
boolean h=false;
f++;
Output
https://www.poriyaan.in/paper/object-oriented-programming-76/
JavaDoc Comments
Javadoc is a convenient, standard way to document your Java code. Javadoc is
actually a special format of comments. There are some utilities that read the
comments, and then generate HTML document based on the comments. HTML
files give us the convenience of hyperlinks from one document to another.
The class level comments describe the purpose of classes and member level
comments describe the purpose of members.
The Javadoc comments start with /** and end with */ For example
*@author XYZ
*/
The example of member level comments for the Employee class is as shown
below
public Employee()
this.salary=0;
return salary;
this.salary=No_of_Days_Worked* Payscale;
}
Along with the above mentioned tags some HTML tags can also be included in
Javadoc comments. For example, we can use<table><img> tags in Javadoc. Also,
we can include special tags like < in the Javadoc. Some words like true, false
and null can also be included in Javadoc.