Don't get the notion that there is such a thing as a “main class”. Don't think that one class is more important than all the others; that isn't true.Johny Sougiospitos wrote:. . . so the main class is . . .
A few things wrong with this.Johny Sougiospitos wrote:
Carey Brown wrote:Did you try: 1985-06-23
Carey Brown wrote:Where is 's' defined and set?
Carey Brown wrote: System.out.println("FirstName: "+s.getFirstName()+" LastName: "+s.getLastName()+" DateOfBirth: "+s.getDateOfBirth()+" Fees: "+s.getFees());
I provided some missing code, could that be it? Can you post your session input/output?Johny Sougiospitos wrote:so it's working for you??
i am still getting the error here.
Carey Brown wrote:One Scanner gotcha is that you should only ever open a single instance of a Scanner using System.in IN THE ENTIRE PROJECT. The easiest way to guaranty this is to create it as a static constant in one of the classes in your project and then have everywhere else reference that constant if it needs to.
And when you need it, some variation of
Also, never ever close a scanner made from System.in, even if the compiler warning messages tell you to.
Carey Brown wrote:
I provided some missing code, could that be it? Can you post your session input/output?Johny Sougiospitos wrote:so it's working for you??
i am still getting the error here.
Carey Brown wrote:expecting 2 digits for the month
Carey Brown wrote:You really need to define your own formatter then you can do "yyyy-M-d" which will take one or two digits.
Carey Brown wrote:My turn for sleep. ZZZZZZzzzzzzzz................
There's a city wid manhunt for this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|