Skip to content

Commit 40344f9

Browse files
committed
Added Prominent comments for more understandable code
1 parent 6a1fbdd commit 40344f9

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

A_Hello_World.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
class A_Hello_World
22
{
3-
/*
3+
/********************************************
44
- Every program in Java must have a class.
55
- Every Java program starts from the main method.
6-
*/
6+
******************************************/
77
public static void main(String args[])
88
{
99
System.out.println("Hello World");
1010
}
1111
}
12-
/*
12+
/************************************************************************************************
1313
- public: anyone can access it
1414
- static: method can be run without creating an instance of the class containing the main method
1515
- void: method doesn't return any value
1616
- main: the name of the method
17-
*/
18-
/*
17+
**************************************************************************************************/
18+
/************************************************************
1919
-Another name for a Multi-Line comment is a Block comment.
20-
*/
21-
/**
20+
************************************************************/
21+
/******************************************
2222
This is also a documentation comment
23-
*/
24-
/**
25-
Javadoc is a tool which comes with JDK and it is used for generating Java code documentation in HTML format from Java source code which has required documentation in a predefined format.
26-
*/
23+
******************************************/
24+
/***********************************************************************************************
25+
Javadoc is a tool which comes with JDK and it is used for generating Java code documentation in
26+
HTML format from Java source code which has required documentation in a predefined format.
27+
***********************************************************************************************/

C_UserInput.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static void main(String[ ] args)
1313
*/
1414
}
1515
}
16-
/**
16+
/***************************
1717
Read a byte - nextByte()
1818
Read a short - nextShort()
1919
Read an int - nextInt()
@@ -23,4 +23,4 @@ public static void main(String[ ] args)
2323
Read a boolean - nextBoolean()
2424
Read a complete line - nextLine()
2525
Read a word - next().charAt(0);
26-
*/
26+
******************************/

D_Conditionals.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ else if(age<13)
2222
{
2323
System.out.println("Error");
2424
}
25-
/*
25+
/******************************
2626
Logical Statements two=&& , ||
27-
*/
27+
***************************/
2828
age = 25;
2929
int money = 100;
3030
if (age > 18 || money > 500)

0 commit comments

Comments
 (0)