hey everyone,

I have a quick question, and appretiate any help given,

I need to check if my Javadoc is correct or not,
I have this assignment due, but don't know if there would be a javadoc comment for the "boolean"
I added a javadoc comment to check with you and see if this is correct.

thanx for any help given. :)

/**
	* checks if a line is number or not, and then prints specified line.
	* @param true prints specfied line if number is true
	* @param false prints specified line if false is flase
	* @return true if the input is a number, otherwise false
	*/

	boolean Number = true;
	int r;
	
	for (r = 0; r < input.length(); r++)
	{
		if(!(begin.next() == end.previous()))
			{
				number = false;
			}
	}

No, you don't put javadoc comments inside methods.

Edit: On an unrelated note, "Number" would be a really bad name for a boolean variable. Number is the base class for numeric wrapper classes like Integer. Variables should also begin with a lowercase letter. "isNumber" would be a better choice and would convey the boolean nature by it's name.

okay, thank you very much for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.