Ask Question

printTodaysDate is a method that accepts no arguments and returns no value. Write a statement that calls printTodaysDate. Assume that printTodaysDate is defined in the same class that calls it.

+2
Answers (1)
  1. 25 July, 00:28
    0
    printTodaysDate ();

    Explanation:

    A method or function is called in programming languages like java by typing the method's name followed by a pair of parenthesis and a semi-colon to end the statement. The parenthesis will contain the parameters if the method accepts argurments when called.

    For the example in this question, the method printTodaysDate (), accepts no arguments. It is important also to note that if a method returns a value, then it can be called and assigned to a variable, for example if printTodaysDate were to return a value then it could also have been called like this: todaysDate=printTodaysDate ();
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “printTodaysDate is a method that accepts no arguments and returns no value. Write a statement that calls printTodaysDate. Assume that ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers