File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

"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: 230
    
    2

Java Calendar
This may be one of the things you need.
 
 
subject: Get the day of the week & month in word from constructor into main with input
 
Similar Threads
Manual Calendar
Subtract 2 Dates
Help Needed
How to get current date and time
Months and years