Question: Which of the following method declarations is correct for a static method named displayFacts() if the method receives an int argument? a. Public static int

Which of the following method declarations is correct for a static method named displayFacts() if the method receives an int argument?
a. Public static int displayFacts()
b. Public void displayFacts(int data)
c. Public static void displayFacts(int data)
d. Two of these are correct.

Step by Step Solution

3.52 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

c Public ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!