Skip to content
Advertisement

Can’t understand what Javadoc is [closed]

I can’t understand what ‘Javadoc’ is. I wanted to know the difference between the /** */ and /* */ comments in the first place.

When I saw the answer in here, It said something about HTML and APIs in java. It was totally confusing and I couldn’t understand anything. I am just a beginner in Java, so please help me…

I saw that there was absolutely NO Difference when I used both of them. The compiler ignored both multiline comments when it was executed.

Advertisement

Answer

Javadoc has nothing to do with the compiled code or any other runtime behaviour.

It’s there so that the programmer can comment on the classes, variables and methods. All in-place, no external comments or files needed.

And when you have an IDE like Eclipse or IntelliJ, it will show these comments when you hover over the method call somewhere else.

Javadoc can also be read from the source code (.java classes) and compiled into HTML pages, just like all major Java documentation is.

Check this out, it’s a pretty good overview: https://www.baeldung.com/javadoc

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement