Greetings to all who read this, i am completely new to java and have a problem with importing my own class file.
My main page is this:
the imported file is this :
public class ConCLOCK { private long seconds; private long minutes; private long hours; private long totalSEC; public ConCLOCK ( long secs, long mins, long hrs) { seconds = secs; minutes = mins; hours = hrs; } //converts minutes into seconds public long ConMINUTES () { if (minutes > 0) { minutes = (minutes * 60); } return minutes; } //converts hours into minutes then seconds public long ConHOURS () { if (hours > 0 ) { hours = (hours * 60) * 60; } return hours; } public void ConTOTAL () { totalSEC = (seconds + minutes + hours); System.out.println ( "Total time conversion to seconds is : " + totalSEC ); } }
I am compiling from cmd prompt and not from eclipse or anything like that. I have two compiling errors that say that I need to add a "." and a ";" at the word ConCLOCK of line one right after import. My ultimate goal is to package the two class files. I am completely stumped and have no experience. Any help would rock my world. thx.