All pastes #160397 Raw Edit

Unknown symbol error

public java v1 · immutable
·published 2006-09-04 07:09 UTC
rendered paste body
import java.util.*;public class Year{ public Year(int year) {  year_number = year; }  public void setYear(int year) {  year_number = year; }  public void viewCalendar() {  GregorianCalendar tmp = new GregorianCalendar();    int year = this.year_number;  int mont= tmp.get(Calendar.MONTH);    do{   int month = tmp.get(Calendar.MONTH);   //System.out.println(this.getMonth(month));   this.showDays();   System.out.println();   tmp.set(Calendar.DAY_OF_MONTH,1);   int day = tmp.get(Calendar.DAY_OF_MONTH);   int pos = tmp.get(Calendar.DAY_OF_WEEK);   this.showBlanks(pos);   do{    System.out.printf("%3d\t",day);    if(pos == 6)     System.out.println();    tmp.add(Calendar.DAY_OF_MONTH, 1);    day = tmp.get(Calendar.DAY_OF_MONTH);    pos = tmp.get(Calendar.DAY_OF_WEEK);            }while(tmp.get(Calendar.MONTH)== month);      tmp.add(Calendar.MONTH, 1);        }while(tmp.get(Calendar.YEAR)==year);     }  private void showBlanks(int pos) {  for(int i = 0; i < pos; i++)  {   System.out.print("   \t");  } }   private void showDays() {  System.out.printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t","Sun","Mon","Tue","Wed","Thu","Fri","Sat"); } private int year_number;}