• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Where are the dates

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all:
This board was highly recommended by a couple of folks in my beginning java class so I hope that I am not imposing on you with my questions.
I did a search on the web for calendar projects (like a lot of us did) and I found this one. This code is suppose to print out a calendar for a month and year that's input by a user. The code prints out the month and array of days of the week but it will not print out the dates of the month.
Would someone be able to tell be why the program scrolls down after the days of the week row instead of printing out the dates 1, 2, 3, etc.? How do I get the dates of the month to show up.
Thank you for your patience and assistance.
 
buckaroo
Posts: 401
Postgres Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will this even compile?
 
Alice Stevens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It compiles without any problems but when I run the code I get:
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code is NOT compiling...
Where is the class 'SavitchIn'?
Rene
 
Alice Stevens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My apologies - the Savitch Class is a Class that came with the CD in the book we're using. Here is the Savitch class:
 
Donald R. Cossitt
buckaroo
Posts: 401
Postgres Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
File won't compile

I am not real familiar with the symbol pointed to by the JVM. What package is this imported from? Other than that it is difficult to tell where some of your if/else & for structs end and begin as there are few to no curly braces. The total lack of indentation at those junctures makes it equally difficult to see what you are doing.
Check this out.
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this block of code near the end:

I'm not sure because I haven't tried running it, but it seems to me that if you'd replace the second System.out.println() with something like:

... then you might get the correct output.
 
Alice Stevens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh my - there goes those dates. It's amazing what the difference a few lines of coding can do.

Thank you!
[ April 25, 2003: Message edited by: Alice Stevens ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic