Variable not passing into anther class Java -
got unusual one, have variable t
utilize in 1 class, changes, (e.g. 1 becomes 5) , phone call class utilize in class, problem t 0 when passed, doing wrong
here t in class edited
public int t = 1; //defualt value amount of seconds in future job should wait untill sent public int gett() { homecoming (t); } public void sett(int t) { this.t = t; }
and class using calls t above class use:
public class dealytillprint { public int t; public string completefilename; private string printerindx; private static int s; private static int x; public static int secondstillrelase; public void countdown() { system.out.println("countdown called"); s = 1; // interval t = (t * 60); // number of seconds system.out.println("t : " + t); while (t > 0) { system.out.println("printing in : " + t); seek { thread.sleep(s * 1000); } grab (exception e) { } t--; }
and here set t
using spinner
<p:spinner min="1" max="1000" value="#{printersettings.t}" size ="1"> <p:ajax update="newtime"/> </p:spinner>
how can phone call t value passed not 0
in dealytillprint
declare public int t;
t
different t
declare in first code sample. since give no value, it's default value of 0 assigned. doing nil share t
in first sample t
in sec sample.
change t = (t * 60); // number of seconds
t = (printersettings.gett() * 60);
java
No comments:
Post a Comment