aspose file tools
The moose likes Java in General and the fly likes Get the day of the week & month in word from constructor into main with input Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Get the day of the week & month in word from constructor into main with input" Watch "Get the day of the week & month in word from constructor into main with input" New topic
Author

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

Ween Li
Greenhorn

Joined: Aug 30, 2010
Posts: 4
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
Bartender

Joined: Aug 16, 2005
Posts: 12929
    
    3

"aa ppee", welcome to JavaRanch. Please check your private messages for an administrative message from JavaRanch.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 156

Java Calendar
This may be one of the things you need.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Get the day of the week & month in word from constructor into main with input
 
Similar Threads
Subtract 2 Dates
Manual Calendar
Help Needed
How to get current date and time
Months and years