public Delivery(String y, String m, String d, String w, String c)
public String getDelivery()
How come I have to specify return of String sometimes and other times I don't?
The first line is a constructor. The second line is a method. A constructor will never return anything, not even void. All methods must return something, even if that something is "void".
As Marilyn points out, you first need to understand the difference between a constructor and a regular method. Once you figure out that much, then you need to work what the return type means. All methods have a return type. (Note that constructors are not methods.) If you still need help, please let me know and I will be glad to explain further.
Layne
Post by:autobot
ice is for people that are not already cool. Chill with this tiny ad:
a bit of art, as a gift, the permaculture playing cards