-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathC4 DocComments.java
More file actions
46 lines (38 loc) · 895 Bytes
/
C4 DocComments.java
File metadata and controls
46 lines (38 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// DOC Comments
public class DocComments {
public static void main(String[] args){
}
/**
* Function name: func
*
* Inside the function:
* 1. prints: "Hola!"
*/
public static void func () {
System.out.println("Hola!");
}
/**
* Function name: printAge
* @param age (int)
*
* Inside the function
* 1. prints "Your age {age}"
*/
public static void printAge(int age){
System.out.println("Your age: " + age);
}
/**
* Function name: calArea
*
* @param length (double)
* @param width (double)
* @return (double)
*
* Inside the function:
* 1. calculate the area and return it.
*/
public static double calArea(double length,double width){
double area = length*width;
return area;
}
}