java - Issue with Threading -
I like the program to use thread to run two loops at a time in your program I want to be able to Although I am not sure how to use threads and I have to face errors, I do not know anything. I will post the code, but I will ignore most of these, it is some hollow rock which I want to do to clean all this thread.
I'm getting the error "not override the summary" and this highlights "class game runable" section. This code is:
implements the public class game Runnable {@Override Public Zero Run (int Time) {try {time = 1; While (time & lt; = 10) {Thread.sleep (10); System.out.print (time); Time ++; } Four clear = (four) (12); System.out.print (clear); System.out.println ("You've Ended Time! Game Over!"); System.exit (0); } Hold (Exception e) {}} throws public static zero principal (string algos []) exception {System.out.println ("Welcome to pseudo-where is, look at low calorie l-characters"); Thread.Sleep (500); System.out.println ("You get 10 seconds to find it."); Thread.Sleep (500); Println ("Ready ..?"); Four clear = (four) (12); Thread.Sleep (500); System.out.print (clear); Boolean timer = wrong, col = false, estimate = false; Int length = 5, time = 0, line = 1, y = 0; String Manip = (""); Int x = (length * length); Random Gen = New Random (); Int Find = Gene Nautics (x) +1; (For example, int collumn = 0; collumn & lt; = length; collumn ++) {for (int row = 0; row & lt; = length; row ++) {while (! Col!) {Y ++; System.out.print ("" + y); If (y-1 == length) {System.out.println (); Println (); Col = true; }} System.out.print ("I"); Manip = Manip + ("I"); } System.out.println ("\ t" + rowNum); ROWNUM ++; Manip = Manip + ("I"); } Boolean constant = false; Do {if (find% 3 == 0) {contin = true; Search = Search - 1; } And if (find% 3>) {find = find - 1; }} While (string; newManip = manip.substring (0, find) + 'l' + manip.substring (+ 1 search); string allocon = newmap. Substring (0,18); string subtwo = newManip.substring (18 , 36); String subThree = newManip.substring (36,54); String subfor = newManip.substring (54,72); String subfivis = Newmap. Substring (72,90); String subicens = newmap. Substring (90,108); Println (subOne); println (subTwo); println (subFour); println (subFive); println (subSix) thread thread A = new thread A (); threadA.start (); while (estimate! = True) {System.out.print ("Answer (only one try):"); int answer = sc.nextInt (); if (answer == last n {} = {True}}}
}
Cheers for any help.
runnabel = "post-text" itemprop = "text"> to implementation (unless your class is not the abstract
, which opens another discussion). What is in your game
category is run (int time)
, which will not be counted .
From the API:
The running interface should be implemented by any class whose example is intended to execute by a thread. Should not define any arguments that run the class .
Added bold by me.
Comments
Post a Comment