This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have a class A which includes [ String timeStamp = new SimpleDateFormat("ss S").format(new Date()); ]
and there is a class B which has a method [ private void dialogDuration(String timeStamp) ]
and dialogueDuration method includes:
And one condition is that the statement( [ String timeStamp = new SimpleDateFormat("ss S").format(new Date()); ]) wont be changed in class A. And an object of class B is created in class A so that it invokes the dialogueDuration(timeStamp) method and passes the values of timeStamps to class B.
My problem is this substraction does not work, it gives an error(cannot invoke getTime() method on the primitive type long). it gives the same kind of error also for int and String types ???