Accessing a thread from a main class, please help!

Hi, I have a thread, T1, that I need to access from my main class. I cannot use runnable, it's got to be done with extands thread. I can start it alright, but I cannot stop it;
MAIN CLASS
public class Uppgift1 {
public static void main(String args[]) throws InterruptedException {
// Start Thread 1
     Thread trad1 = new T1( );
     trad1.start( );
     //Wait for 5 seconds
     Thread.sleep(5000);
     //Stop the Thread
     trad1.stopIt();
public class T1 extends Thread {
     boolean go = true;
public void run ( ) {
while(go){
     System.out.println("T1: Trad 1");
try{
Thread.sleep(1000);
} catch( InterruptedException e ) {
public void stopIt(){
go = false;
Why can't I run stopIt from my main class?
Please help me.

manswide wrote:
The reason I have to use Thread is that it's for a school thing; I guess I gotta learn to do it the bad way in order to learn why to love the good way later on.Good plan. Making mistakes is a fantastic learning tool
How do I declare a reference to my own class?
T1 t1 = new T1();

Similar Messages

  • I have a iPad 3 and the iPhone 5 and I can't access yahoo mail from. Either device please help

    I have a iPad 3 and the iPhone 5 and I can't access yahoo mail from. Either device please help

    Swipe up from bottom of screen.
    Control Center
    http://support.apple.com/kb/HT5858

  • I used to be able to access google calendar from firefox, but suddenly I can't. I can access google calendar from Internet Explorer. Please help

    For some reason I can't get firefox to load Google Calendar. It loads GMail and I can load google calendar if I use Internet Explorer, but not Firefox. I have uninstalled Firefox and installed but nothing works. Pleas help

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds). Ignore the "Slide to power off".

  • I'd like to know how to change my profile picture that appears on mail threads on my mac.  please help.

    I'd like to know how to change my profile picture that appears on mail threads on my mac.  please help.

    There may be other methods, but below is how I change my email photo.
    Here is how to change your Mac Mail email photo in Mountain Lion:
    Open the App called "Contacts". Type your name in the search field. Your contact info and photo should appear. Click on your photo. You now have some photo options. I use the "Recents" tab, and simply drag photo files from Finder into that window in Contacts. Drag and drop.
    If you have trouble finding yourself in "Contacts" you can also get there by doing this:
    Open one of your sent messages. Double click your photo in that message. This opens another window with your photo in it. Double-click that photo. This should open your contact information in the Contacts App.
    Hope this helps.
    -Craig

  • HT1451 Music has completely disappeared from ITunes library! Please Help!!

    Music has completely disappeared from ITunes library! Please Help!!
    Hours and Hours of renaming, adding cover photos and so on have been for nothing. Itunes cannot find the files since they're not in the library at all!
    I still have the music on my computer but don't want to add it as it is, as I have spent a lot of time "fixing" it! PLEASE HELP!

    Did you use spotlight to search? (I'm assuming you have a Mac as given above despite this thread being in the Windows forum). How long have you used iTunes on this computer? Is there a backup to your library, perhaps an only copy of it on a machine you've "retired". Is the media present in the media folder? (Yes, you've answered that earlier.) If so then the media files should have absorbed all the tag changes that you made and reimporting the media into a new library might not be a complete disaster, though playlists, playcounts, ratings etc. would be irretrievably lost.
    tt2

  • I am facing issue in Receiving incoming calls, Name not getting displayed though the same has been saved in my phone book!! I have done sync from Windows contacts.. please help if some1 knows how to rectify the issue...

    I am facing issue in Receiving incoming calls, Name not getting displayed though the same has been saved in my phone book!! I have done sync from Windows contacts.. please help if some1 knows how to rectify the issue...

    Has your carrier been having issues with Call Display? Do the telephone numbers come up when people call, or does it just show 'Unknown Number' or 'Blocked' ?

  • Hello there. i lost my Ipad and i need to log out all email and facebook. Also is there any chance get my diary somehow. how can i log out from my Ipad? please help, i have very important information and other stuff in my Ipad?

    I need help to log out from my stolen Ipad. please help.

    If you had installed iOS 7 it would be Activation locked, but I see you only have iOS 5. You do have a backup of you iPad files on your computer or iCloud, don't you?
    If the iPad was running iOS 7, the thief/finder will not ever be able to use it.
    iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818
    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    What to do if your iOS device is lost or stolen
    http://support.apple.com/kb/HT5668
    How to Find a Missing iPad with FindMyiPad
    http://www.dummies.com/how-to/content/how-to-find-a-missing-ipad-with-findmyipad .html
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698
    iCloud: Lost Mode - Lock and Trace
    http://support.apple.com/kb/PH2700
    iCloud: Remotely Erase your device
    http://support.apple.com/kb/PH2701
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    General steps to follow for a Stolen iPad
    http://stolen-ipad.com/
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st Len
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
    Check the serial number (located on back/bottom) in this lost/stolen iPad database. However, most owners are not aware of this database and don’t enter the serial number.
    Stolen iPad Database
    http://www.stolenlostfound.org/online-stolen-ipad-database
    Also do a search, using the serial number, on your local Craig’s List. Some users list the serial number of a stolen iPad to thwart the sale of a stolen device.
     Cheers, Tom

  • Hi, All. Iam using Adobe Document Cloud. After saving a pdf document to this cloud, I am able to see my PC folders . How to disable this? Does my PC folders are also available across other PC's to access them with my Adobe ID? Please help me. Thanks

    Hi, All. Iam using Adobe Document Cloud. After saving a pdf document to this cloud, I am able to see my PC folders as well with a browsing option  . How to disable this? Does my PC folders will  also available across other PC's to access them with my Adobe ID? Please help me. Thanks in advance.

    Hi indi68632954,
    I can understand your concern & you need to worry about this, as your PC folders won't be available on other PC's as this option is just to browse through the files of the specific system on which you are working as shown in the screenshot below.
    Only the files uploaded on the Document cloud will be available over Internet using Adobe Document Cloud service upon the authentication of your Adobe ID & password.
    I hope this will answer your query.
    In case if you have any further query please let us know, we will be happy to assist you.
    Regards,
    Aadesh

  • My iphone is at tech service and since it is in guarantee period most probably they will give a new one.Thats why I want to deactivate or sign out my apple ID from that Iphone. Please help me, what shoud I do?

    My iphone is at tech service and since it is in guarantee period most probably they will give a new one.Thats why I want to deactivate or sign out my apple ID from that Iphone. Please help me, what shoud I do?

    Wow... you seriously over paid for an iPhone.
    That probably explains why you have/had no clue you were purchasing a locked device and think it's an Apple problem to get it unlocked.

  • I made upgrade for IOS to 7.04 but my iphone is second hand and when iphone need to make activation ,i don't have the apple ID so my iphone didn't work from this time so please help me urgent

    I made upgrade for IOS to 7.04 but my iphone is second hand and when iphone need to make activation ,i don't have the apple ID so my iphone didn't work from this time so please help me urgent.

    There isn't one.
    amrzaky wrote:
    I can't contact with previous owner s i need another solutoin
    The Apple ID and Password that was Originally used to Activate the iDevice is required.
    If you cannot get this information from the seller
    Removing a device from a previous owner’s account
    You need to return the Device for a refund, as you will not be able to re-activate it.

  • Unable to update software or upload pics from SD card-how do I remove files from startup disk? Please help!

    Unable to update software or upload pics from SD card-how do I remove files from startup disk? Please help!

    Hello Smile_333
    The article below will assist with finding things and help increase the hard drive space for your computer. The best way is to have an external hard drive to copy things to if you do not want to delete and loose things.
    OS X Mountain Lion: Increase disk space
    http://support.apple.com/kb/PH10677
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Hi, i am living in Vietnam but bought a Macbook pro on my trip to Hong Kong.  I cannot access Facebook on Mac in vietnam.  Please help.  Thanks.

    Hi, i am living in Vietnam but bought a Macbook pro on my trip to Hong Kong.  I cannot access Facebook on Mac in vietnam.  Please help.  Thanks.
    I also bought Microsoft Office Home and Student and cant use the Outlook.  Is there anyway to just install the Outlook on my Mac?  Or i have to buy a new one which is is Home and Business?
    Thanks,
    Julie

    Try enabling the Personal Hotspot on the iPhone and connecting the Mac to the Internet thru it. If Facebook works ok then, that would mean the ISP is either blocking or having connection problems whereas the phone carrier is not.
    Be mindful that carrier data charges can be outrageous so use this as a test first.

  • I have a collection of thousands of ebooks mostly in epub  & some in PDF formats.  After migrating to Maverick all books disappered from my Ipad. Please help.

    I have a collection of thousands of ebooks mostly in epub  & a few in PDF formats.  After migrating to Maverick all books disappered from my Ipad. Please help. In itunes library book option has vanished. What do I do?

    Hi Akshay,
    If you want your images to appear standalone with no other page item on the page, then you can insert Page break on an image.
    This is how you can specify a page break:
    1. Select the image
    2. Goto Object->Object Export Options
    3. Select EPUB and HTML tab
    4. Select Custom Layout check box and then check Insert Page break. You can select from the option in the dropdown-Before Image, After Image, Before and After Image as per your requirement.
    Regarding your question about images:
    You export your graphs as JPEG but are those JPEGs of good resolution? If they are, then InDesign is doing something wrong during export but if the JPEGs are not of good quality then it is not an export issue. Please provide some more details here.
    Regards,
    Pooja

  • HI! I am using iTunes with Windows 7 64bit.after upgrading itunes  to 10.5.2.11 it opens only once. If i close it, then it will not open again.the only way to open itunes is by disabling the APSDaemon.exe from the task manager.please help!

    HI! I am using iTunes with Windows 7 64bit.after upgrading itunes  to 10.5.2.11 it opens only once. If i close it, then it will not open again.the only way to open itunes is by disabling the APSDaemon.exe from the task manager.please help!

    Refer this article to reset Winsock to it's default.  Your PCTools may have inserted LSP.
    http://support.apple.com/kb/TS4123?viewlocale=en_US
    After reset and restarting windows, you may get a prompt to remap LSP, click no.

  • HT3702 Clash of the Clans game is suffering from in-app purchase, please help

    Clash of the Clans game is suffering from in-app purchase, please help.

    im having the same prob but with all my games

Maybe you are looking for

  • Trial Version of CS6 Design Standard Won't Activate

    have been having some issues with activating a trial copy of CS6 Design Standard for testing for my employer. I had some big issues with actually downloading the software getting a Error:100 code. I had to download it from home to bring it in thinkin

  • How to change the font size of pdf reports

    hi, in my project i'm using wad for my reports when i execute these reports from wad and convert it into pdf format the font size of the pdf report is very small. what can i do in order to rectify this? are there any settings where i can change the f

  • Infoset not appearing in SQ01

    Dear Experts , I created an infoset  ZXXX with a few table fields & saved the same . Now i want to create query using this infoset with T Code SQ01 . BUT I see that in SQ01 the infoset created doesnt appear at all . only 1 infoset is there that is  /

  • One wake from sleep solved

    Time will tell if it is truly solved but I noted a comment about my screensaver /desktop path in a recent crash report when I had to hard reset after my machine would once again refuse to wake from sleep. After looking at my picture folder that was s

  • Updating optional regions

    I'm just starting to figure out how templates work, but I've run into an issue that I'm certain is easily solved. So far the template is just a logo, a picture and 5 buttons linked to 5 template using pages. Each of the buttons are defined as optiona