• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get the day of the week & month in word from constructor into main with input

 
Ween Li
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i need to modify this code to fit the requirement.....any help and sample would be appreciated..
For this program, i need to: take in day, month,year of a date as int argument, return the day of the week for the date entered in App()

In Main: call the App() to get the day of the week to display when user enter the date in dd/mm/yyyy
StringTokenizer is required for this program.

- How can the arguments pass back to main by returning of month & day of the week?
- Program cant take in int and return as string
- Date cant display day of the week

Program output: 29 Aug 2010 is a Sunday



 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15354
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"aa ppee", welcome to JavaRanch. Please check your private messages for an administrative message from JavaRanch.
 
Raymond Tong
Ranch Hand
Posts: 255
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Calendar
This may be one of the things you need.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic