24.5k views
1 vote
Assume the availability of class named Date Manager that provides a static method, print Todays Date, that accepts no arguments and returns no value. Write a statement that calls print Todays Date?

User Zeekstem
by
7.4k points

1 Answer

1 vote

Answer:

DateManager.printTodaysDate();

Step-by-step explanation:

As class named "DateManager" which will call the "printTodaysDate()" static function.Static method are those who are accessed by the classname not by the object .

  • As printTodaysDate(); is a static method it means it cannot hold non static data.It hold only the static data,We cannot used super keyword in the printTodaysDate(); function.
  • So the statement DateManager.printTodaysDate(); calls print Todays Date.
User Jihun No
by
6.9k points