I got this question for homework, and all I can think of is to return a subclass of an abstract superclass.
Thanks!
I got this question for homework, and all I can think of is to return a subclass of an abstract superclass.
Thanks!
Try looking at the existing Java APIs (eg: java.lang
and java.util
) to see where they use static methods.
java.lang.Runtime.getRuntime()
java.util.Calendar.getInstance()
String.valueOf(int)
java.lang.String.format()
java.util.Arrays
, java.lang.Math
, java.util.Collections
.Dont forget about using them to kick off the console applications we all had to write in cs101