java - Why am i getting this error '.class' expected? -


im trying create program im getting errors cant eliminate. can give me hand please?

        import java.util.scanner;  class juliandate {     long year;     long month;     long day;     long epochyear;         juliandate() {       }   long returnjulianepochdays(long year, long month, long day){ long yearcounter = epochyear; long total = 0;  while (yearcounter < year){  total += returndaysinyear(yearcounter);  yearcounter += 1;   }   total += returnjuliandate(long year, long month, long day);   return total;   }  }   public class juliandatenew {        } 

errors:

these errors when compile program:

/users/netbeansprojects/javaapplication1/src/juliandatenew.java:25: '.class' expected   total += returnjuliandate(long year, long month, long day);  /users/netbeansprojects/javaapplication1/src/juliandatenew.java:25: ';' expected   total += returnjuliandate(long year, long month, long day);  /users/vlopezlama/netbeansprojects/javaapplication1/src/juliandatenew.java:25: <identifier> expected   total += returnjuliandate(long year, long month, long day);  /users/netbeansprojects/javaapplication1/src/juliandatenew.java:25: not statement   total += returnjuliandate(long year, long month, long day);  /users/etbeansprojects/javaapplication1/src/juliandatenew.java:25: ';' expected   total += returnjuliandate(long year, long month, long day); 

this declaration doesn't make sense:

total += returnjuliandate(long year, long month, long day); 

since you're making method call returnjuliandate, want pass variables declared type:

total += returnjuliandate(year, month, day); 

now, if method returnjuliandate doesn't exist, you've got issue tackle.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -