Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how do you specify that a method is a constuctor in java? a- methd has both a na

ID: 668429 • Letter: H

Question

how do you specify that a method is a constuctor in java?

a- methd has both a name and return type the same as the class

b- uses the first method in the class declaration

c- uses the special method name "int"

d- method name is the same as the class and no return type

2- why would be a variable be marked as prrivate ?

a- to prevent interrupts on that variable

b- to mark a variable as a black box that you can't see into

c- to protect your intellectual property

d- to ensure outside users don't involve themselves with the internal workings of a class

3- what is javadoc?

4- what is the valid return statment for java ?

Explanation / Answer

1. how do you specify that a method is a constuctor in java?

d- method name is the same as the class and no return type

2. why would be a variable be marked as prrivate ?

d- to ensure outside users don't involve themselves with the internal workings of a class

3. What is JavaDoc?

Javadoc is a documentation generator from Oracle Corporation for generating API documentation in HTML format from Java source code. The HTML format is used to add the convenience of being able to hyperlink related documents together.

4- what is the valid return statment for java ?

The return statement which return the value as per the return type of method is the valid return statement in Java.