Answers for "Commenting in Java"

2

java what are the comments before a method

/**
* Returns an Image object that can then be painted on the screen. 
* The url argument must specify an absolute <a href="#{@link}">{@link URL}</a>. The name
* argument is a specifier that is relative to the url argument. 
* <p>
* This method always returns immediately, whether or not the 
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives 
* that draw the image will incrementally paint on the screen. 
*
* @param  url  an absolute URL giving the base location of the image
* @param  name the location of the image, relative to the url argument
* @return      the image at the specified URL
* @see         Image
*/
public Image getImage(URL url, String name) {
try {
return getImage(new URL(url, name));
} catch (MalformedURLException e) {
return null;
}
}
Posted by: Guest on April-29-2021
3

comments in java

// single line comment example
// integer variable 'a' is assigned value 5
int a = 5;

/*
This is
an example for
java multiline comment
*/

// Documentation comments example
/**
* <h1>Area of Square</h1>
* Area of Square java program calculates area
* using given side value and prints the area.
* <p>
* <b>Note: Adding comments in a java program makes it more
* user friendly and is presumed as good quality code
* 
* @author Sachin
* @version 1.0
* @since 2015-04-12
* </b>
* </p>
*/
Posted by: Guest on November-30-2020
0

Comment in Java

// This is how you comment in java
/* You can also do it like this */
Posted by: Guest on June-13-2021
0

comments java

// this is a comment

/* this is 
   a multiline
   comment */
Posted by: Guest on July-13-2021
0

Commenting in Java

//Single Line

/* Multi Line
Comments 
! */

//Comments cannot be runned
/*This can be
runned */

System.out.println("Hello, World");
Posted by: Guest on October-25-2021
0

make a commet in java

// Demo types of comments

/* This shows
   that the comment
   can be muilti line */
System.out.println("Hello"); // Inline comment
// This is a single line comment
Posted by: Guest on April-12-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language