• Post Reply Bookmark Topic Watch Topic
  • New Topic

a little problem with my code  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have this code in my main :


I want that all the days (Sunday , Monday, etc) will print me the day "Sunday", not a int, how can i do it?
Thanks,
Or.
 
Bartender
Posts: 563
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you have a case for each day of the week, why don't you just print, "The day is Sunday." for each case, as appropriate?
 
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DateFormatSymbols()?
 
Ranch Hand
Posts: 216
Java Linux Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TRY THIS......

[Moderator action: Removed code. Nikhil Sagar, please DontBeACodeMill(⇐click) and LetThemDoTheirOwnHomework.(⇐click)]
 
or koren
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all.
You helped me alot!
 
Nikhil Sagar
Ranch Hand
Posts: 216
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhil Sagar wrote:TRY THIS......

[Moderator action: Removed code. Nikhil Sagar, please DontBeACodeMill(⇐click) and LetThemDoTheirOwnHomework.(⇐click)]


Al right, Sorry Sir.i'll not do that again....
 
Ranch Hand
Posts: 4696
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
another option would be to put the ints and Strings in a HashMap
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!