Why can't I do something like this?

import java.io.*;
import java.util.*;
class a extends Thread {
    public void run() {
        String s = currentThread().getName();
        System.out.println(s);
public class TestThreadName {
    public static void main (String args[]){
                Thread[] p = new Thread[4];    // declare an array for threads
               for (int i=0; i<4; i++){     
                String pid = Integer.toString(i);   
                a p[i] = new a();
                p.setName(pid);
p[i].start();

I don't know why you invent a class 'a' and when
creating a thread don't use it, since 'a' extends
Thread. I don't know what you wanted to achieve with
your example.
But anyway, Thread cannot be extended. You normally
use the interface runnable and write code into run()
or you create a Thread as an inner class.This is incorrect. There is nothing wrong with extending Thread.

Similar Messages

  • MASK PRO - Why can't Adobe add masking like this ! - wow !

    This week, I saw a guy working on a project using a product by OnOneSoftware.com called "Mask Pro"
    He was extracting a woman from a very busy background. He effortlessly removed the woman, including strands of her hair in under a minute.
    I wonder why Adobe cannot implement something so powerful in Photoshop ?
    I am actually amazed at how well this program worked, I'm not sure if it is a plugin or stand-alone program, but it worked side-by-side with Photoshop.
    This Mask Pro works by quickly picking colors that you want eliminate and ones you wish to keep. Each time you click on a color you wish to keep, it loads them onto a little column and you see the colors appear. Then you choose ones you wish to eliminate. These appear on another column. Amazing how this works !
    You then take the special paintbrush tool, and just run over any area, such as the hair, and magically, it removed ALL background but leaves even the smallest strands of hair intact ! - It is truly wonderful to see.
    I'm sure Adobe knows about this product, so I wonder why they cannot make something similar, or just buy the company out and implement their product in Photoshop. You have to see this tool in use to actually believe it.
    Thanks,
    Dave.

    FWIW I don't even own any plug-ins and have used many selection tools and
    know how to make a decent selection
    I use color range, magic wand, magnetic lasso, refine edges and combos of
    those
    Also tried Russell Browns channel technique for flying hair etc (his example
    is on a plain gray cyc) and that hideous pen tool
    a complicated mask make might take me a couple hours and I feel my time is
    worth more
    the service bureau does it for $2.50 overnight
    the one I sent was FREE as a trial of their service
    and I was quite pleased with it
    for me the choice to farm out that un-creative task depends on the job,
    things like number of images to complete in the time frame given
    I prefer to use my time with an image for more the subjective changes, like
    color balance, light, filters, adding creative techniques, fixing what I
    want to
    it is like the choice to use a lab to print or do it all yourself
    benefits to both and choice dictated by the assignment
    after all once we didn't have to sit and process all our own images they
    went to an E6 lab
    and we paid them to do it
    so many things we did manually can now be done by a computer program such as
    replacing part of the background with parts from another frame
    adding softer depth of field by a plug in
    skin smoothing etc
    even windows live has stitching (even a little kid can do it as the
    commercial shows)
    resisitance is futile

  • Winacd, why doesn't apple use something like this, or advertise it?

    I mean it completely fixes the power on issue and adds extra features fur tuning the montitor itself. I dont quite understand since the ACD needs this in order to function correctly on a windows PC.
    Here is the link if anyone is interested.
    http://sourceforge.net/projects/winacd/
    On a second note. I received my display with a scratch on the front bezel. Do you think it is possible to allow me to send mine back and get it fixed? I want it fixed and not replaced since the one I received has a perfect screen on it. i don't want to deal with switching it out again and possibly getting a bad one.

    WinACD is a windoze driver created by Laurent Morichetti and generously offered free of charge. LM has also provided an extremely generous level of personal support to users of this driver. Why does Apple not provide a similar driver? Who knows? Why is there not even a link to this free driver on Apple's web site? Who knows? But look at Apple's Mighty Mouse driver. As weak a piece of software as has ever been offered. Vastly less versatile than either Steer Mouse or USB Overdrive. But at least there is a link for Steer Mouse on Apple's download page.

  • Why do I get a message something like this following message in GarageBand? "Unexpected audio request...(Elastic audio)(-10024)"

    Why do I get a message something like this following message in GarageBand? "Unexpected audio request...(Elastic audio)(-10024)"

    Hi lizz4321,
    A digital ID is made up of three components; a private key, a corresponding public key, and some identifying information. The keys themselves are pretty straight forward, they are just big blobs of numbers used to encrypt and decrypt data. It's the identifying information that gets a bit tricky. On first look, the identifying information looks like plain text. You'll see your name and the issuer's name, a serial number, some dates for when the validity starts and ends. All pretty straight forward.
    However, all of this information is actually formatted using something called ASN.1 (it stands for Abstract Syntax Notation) and then encoded using BER (Basic Encoding Rules). When someone creates a digital ID they can put just about anything in there. Per specifications (RFC 5280 if you wanted to look it up) some items are required, and others are optional. Each piece of information that goes into the public-key certificate (the PKC is basically the digital ID without the private key) is contained in an extension. These extensions are identified using an OID (Object ID) and conform to a specification which may either be public or confidential.
    There are two possibilities in the case you are seeing. Either, some of the information that Acrobat knows about was formatted or encoded incorrectly, or, there is an optional entry that Acrobat doesn't understand how to decode. My guess is it's the latter possibility. There is a rule that states if an extension is marked as critical, and the application using the public-key certificate (in this case the application would be Acrobat), doesn't understand the extension, then the application is supposed to reject the certificate. It could be the former case (badly formatted data), but without seeing the certificate all I can do is guess.
    Steve

  • I buy adobe creative suite for teachers and students about one year ago but now i'm not longer a student. Can I still use this programs legally for commercial purposes or do I have to buy some upgrades or something like this? Please help

    I buy adobe creative suite for teachers and students about one year ago but now i'm not longer a student. Can I still use this programs legally for commercial purposes or do I have to buy some upgrades or something like this? Please help

    The license did not have use restrictions Licenses and terms of use | Adobe
    BUT... when your one year Education account ends, I do not think you will be able to renew at the Education rate

  • TS5362 Why would something like this happen?

    The article worked, but I would like to know how something like this happens?

    thats called tabbed divs or tabbed content
    http://www.menucool.com/tabbed-content
    find lots of ways to use it on Google and even tuts to hand code it

  • I am doing a lot of presenting with the ipad and want an app that would bullseye or show where I am to my audience. Anyone know of something like this?

    I am doing a lot of presenting with the ipad and want an app that would bullseye or show where I am to my audience. Anyone know of something like this?

    It sounds like either your hard drive or the SATA cable that connects it to the motherboard are failing. This could be heat related in your case, which is why you see it after it runs awhile. You can take it to the Genius Bar for a free evaluation. If you decide to test it yourself, I usually suggest moving the hard drive to an external enclosure. If it works there for awhile, the cable is probably the issue.
    http://www.amazon.com/Sabrent-2-5-Inch-Aluminum-Enclosure-EC-TB4P/dp/B005EIGUD4/ ref=sr_1_3?ie=UTF8&qid=1397647657&sr=8-3&keywords=2.5+enclosure
    http://www.ifixit.com/Device/MacBook_Pro_13%22_Unibody_Mid_2009

  • Sony, please tell me how you allow something like this to happen? Horrific Support Experience

    So, the below happened.  Essentialy, Sony sent me four broken TVs, forced me to spend about 20 hours of time replacing those TVs, and has refused to replace my broken television.  The below is a chain with one of your reps.  I would never have expected such a poor customer service experience from a company of Sony's caliber.  It has been very disappointing.  You insist that you are giving me an "offer" but you have given me no options whatsoever.
    I note that you continue to maintain that there is no viable replacement.  However, a simple search on your webpage and online shows that there are multiple 48 inch LED televisions still available.  I find your representation to be disengenuous.  The below chain is only one point in the long line of frustrating communications with your representatives.  All told me different things and made promises that were not kept.  I can only imagine how my case file looks.
    I would like an explanation from Sony how you could allow something like this to happen?  This has been the most frustrating experience I have ever had with a electronics company -- and I have had alot.  It has been terrible.
    ---------- Forwarded message ----------
    From: []
    Date: Fri, Jun 26, 2015 at 7:22 PM
    Subject: Re: [] *Mark*
    To: Sony Support USA <>
    To be clear, I am not "accepting" your offer as I don't think it is fair or makes me whole. I am telling you to do whatever you have to do. You have given me no real other options. 
    On Jun 26, 2015, at 7:04 PM, Sony Support USA <> wrote:
    Hi [],
    Thank you for contacting Sony and for accepting the offer. We apologize that we cannot offer you the regular retail price of the unit since that is not the amount that you paid it for. We will email you a prepaid shipping label which you can use to ship us back your TV and once we determined that it is in transit back to us we will process the check with the amount of $369.99 and you will receive the check in 4-6 weeks. Thank you.
    Regards,
    Mark C7NO
    Sony National Customer Relations
    From:[]
    Sent: Friday, June 26, 2015 9:20 PM
    To: Sony Support USA
    Subject: Re: [] *Mark*
    How you get away with treating your customers like this is beyond me.  I am telling you that I purchased the television at a discounted rate that I am no longer able to obtain.  In other words, the amount you are refunding me will not make me whole.  I am also telling you that your colleague literally offered me a refurbished TV about two hours ago (apparently your group offers less to customers now).  You have already sent me three TVs and wasted about 20 hours of my time.  Despite all that, you unapologetically state that your "FINAL" offer gets me to nowhere that I need to be.  You have no remorse for the situation and have not gone any extra distance to make a customer whole, which is all that I am asking for.
    You have beaten me into submission over the past month with broken TVs, hours wasted shipping, long conversations with support representatives, and failed promises.  You guys go ahead and do whatever it is you need to do.  There is only so much that I can argue about.  No customer should expect this type of treatment from a company like Sony.  People purchase Sony so that they DONT have to deal with that type of nonsense.  This has honestly been the worst customer service interaction I have ever had.
    On Fri, Jun 26, 2015 at 5:54 PM, Sony Support USA <> wrote:
    Thank you for contacting Sony. We double checked if there is a same or comparable refurbished unit for replacement but there is none. Your file is being already being handled by our department which is the highest level you can get since our managers and supervisors are not part of the escalation path. The $319.99 is the amount that you paid for the TV and that is what we are going to refund you and the $50 is for compensation. You are getting more than what you paid for the TV so Sony believes it will cut it. Our offer is FINAL. Thank you.
    Regards,
    Mark C7NO
    Sony National Customer Relations
    From: []
    Sent: Friday, June 26, 2015 8:38 PM
    To: Sony Support USA
    Subject: Re: [] *Mark*
    Mark,
    I just spoke to an individual on the phone who told me that you could send a refurbished model .  That conversation is exactly what prompted my email to this email address -- they told me to reach out here because you could provide me a better option rather than the two that were given.  Now you are telling me that not only can you not offer me a better option but that you are taking away an option previously given.  This is getting more and more ridiculous.  I am sorry but this just isnt working for me.  I dont understand how there is this much miscommunication between your departments. 
    I would like to be put in touch with a manager on this case.  Your offer to refund me 320 + 50 will not cut it.  I am amazed that a company like Sony, which people purchase because of the supposed product support and service, is failing their customer in this way.  It's very disappointing.
    On Fri, Jun 26, 2015 at 5:30 PM, Sony Support USA <> wrote:
    Hi [],
    Thank you for contacting Sony. Like we mentioned from our last email, the best and final offer is the buyback. If you don’t like the offer then we don’t have any other option for you. Thank you for choosing Sony.
    Regards,
    Mark C7NO
    Sony National Customer Relations
    From: []
    Sent: Friday, June 26, 2015 8:10 PM
    To: Sony Support USA
    Subject: Re: [] *Mark*
    Thanks, Mark.  My preference would then be to try a refurbished model one more time.  The issue is that I got the TV at Black Friday discount.  I wouldnt be able to replace it even if I wanted to.  So, I will try one more time and go from there.  Please let me know once the TV is shipped.
    On Fri, Jun 26, 2015 at 4:21 PM, Sony Support USA <> wrote:
    Hi [].
    Thank you for contacting Sony. We apologize if you don’t want that option but this is the best Sony can offer since there is no same or comparable model to offer you anymore. If the unit will be replaced it will be the 4th time already and to tell you honestly it will be much cheaper for you to just buyback the unit rather than to pay the shipper deliver the TV every time we replace it and we are not saying that it is your fault just to make it clear. We will buyback the unit for $319.99 and we will add up another $50 as compensation for all the troubles. Please let us know once you have made your decision. Thank you.
    Regards,
    Mark C7NO
    Sony National Customer Relations
    From: []
    Sent: Friday, June 26, 2015 7:16 PM
    To: Sony Support USA
    Subject: Re: [] *Mark*
    I don't want that option.  I would take a refurbished model again over the refund. 
    You are saying that I spend 20 hours of my life dealing with you, driving to and from fed ex three times, mounting and taking down three broken televisions, and you do nothing to compensate me for my time?  I would never expect this from a company like Sony. 
    On Jun 26, 2015, at 4:10 PM, Sony Support USA <> wrote:
    Hi [],
    Thank you for contacting Sony. As we have mentioned there is no same or comparable model to offer you that is why we offered a buyback for the unit and that is the only option thank you.
    Regards,
    Mark C7NO
    Sony National Customer Relations
    From: 
    Sent: Friday, June 26, 2015 7:05 PM
    To: Sony Support USA
    Subject: 
    As I said, I don't want a buy back. That is not an option for me. 
    Are you saying that you have no other 48inch led television?
    On Jun 26, 2015, at 4:02 PM, Sony Support USA <> wrote:
    Hi [],
    Thank you for contacting Sony. We apologize for the inconvenience this may have caused you. Since there is no same or comparable model to send you as a replacement we will buyback the Tv for $319.99. We will email you a prepaid shipping label for you to return the unit back to us and once we determine that the unit is in transit we will process the check and you will receive it in 4-6 weeks. Should you take the offer please provide the address where the check should be sent to. Thank you.
    Regards,
    Mark C7NO
    Sony National Customer Relations
    From: 
    Sent: Friday, June 26, 2015 6:49 PM
    To: Sony Support USA
    Subject: 
    Over the past month, you have sent me four defective TVs.  I cannot tell you how frustrating this process has been for me.  I never would have thought that a company like Sony could be this bad.  It has been like pulling teeth with you all.
    I purchased my television thinking that it would come along with the best product and support in the market.  That has not been the case.  My TV broke down within a year and now you have sent literally four televisions to replace it but none of them have worked.
    The latest contact I got was that you have run out of new television for my model and instead need to send me another refurbished one or refund me.  I do not want either option.
    I want a brand new TV.  I dont care if it's the same one or a better one but it has to be new.  It cannot be refurbished.  I do not want a refund.
    At this point, I have spent about 20 hours of my life on the phone with you or shipping back and forth items.  I would also like compensation to account for that time.  
    Please email me or call me with a response.
     

    Hi adam26, 
    Welcome to the Sony Community! 
    We certainly empathize with your frustration and we apologize for the inconvenience caused. Please check your other thread here, we saw someone from our customer relation department already responded to your inquiry. Again, we sincerely hope to seek your kind understanding on this matter. 
    Regards, 
    Dave 

  • Why can't Adobe do something as simple as giving us a desktop shortcut?  Or even better allow us to access direct from print option as we could do if we had the software installed?

    Why can't Adobe do something as simple as giving us a desktop shortcut?  Or even better allow us to access direct from print option as we could do if we had the software installed?

    Now that I know you are talking about Cloud (not the focus of this forum -- a forum on Acrobat that does provide the icons and the reason for wondering what you were talking about). The Creative Cloud that I have does include the icons on the desktop. However, I am not familiar with the cloud service other than CC. If it is some other product, then exactly what is the product name. As far as CC, I get the icons on my desktop, so I am not sure what your problem might be.
    If you did not like the tone, I am sorry, But I honestly had no clue what you were talking about because you only said that Adobe icons were not coming up. You provided no information on the product or operating system that are fundamental to providing help. Adobe (the company name) has about 150 forums dealing with different products probably numbering close to 100. So saying no Adobe icons was meaningless to me and thus the question. I was trying to get information to help you. If you took it as an insult, I am sorry.

  • How difficult would it be to create something like this? 

    I'm looking to create a flash widget similar to what WoW has
    on their main page -
    http://www.worldofwarcraft.com/index.xml
    It needs to have images & text that could be called from
    a php or text file, so that it can be dynamically changed. Movies
    will also be integrated in the rotation as well for the Flash.
    How difficult would this be for someone who's new to flash?
    How long would it take and what all is needed to learn how to
    re-create something like this?

    The difficulty and time to do it depends on the learning
    capability of the new programmer. Patience and a drive to learn is
    what all is needed. Accomplishing one step at a time is probably
    the best approach, whether you're new or well-versed.

  • Exist a Jtree node.id or something like this ?

    I would want to retrieve a node using a unique 'id', for example the absolute index (into the total nodes count)
    Is there something like this ?
    Can I add a particular property to a node ? ( for example this 'id' if it does not exist )
    Another question :
    If I want to implement a search code, this 'id' can be useful, or must I transverse the whole Jtree
    Thanks

    Hello.
    Do the following:
    1. Go to the Apple Menu at the top left of the screen
    2. Select Software Update...
    3. Install any updates that are found.
    If the Amazon issue continues after these updates, then do this:
    1. Open Safari
    2. Erase any web address you have currently showing (for example www.apple.com or www.google.com)
    3. Type in www.amazon.com
    4. That should take you directly to amazon.com
    It should look like this in your Safari::

  • Does Something Like This Exist Already (for Window Managers)

    I know that one can use idesk to produce launchers for desktop programs in window managers like Openbox, but what about an actual small file manager, that always sits on the desktop, confined to its own little space.  Kind of like conky, if this makes sense. 
    I don't have a great deal of programming knowledge, just basics, but I've toyed with the idea of making a script to constantly reedit the idesk config file to do this, and while it could work, it's messy at best, and doesn't provide the same desired effect that a small desktop folder sitting on the WM desktop would.
    If this does exist, I give my apologies, but I did try to search Google for it, but got junk results.  Also, would something like this be feasible? (I am looking for a way to improve my programming skills over the summer, and was thinking that this could possibly be a way to do it.)  Even further, would it be acceptable to use Python for it?

    whoops wrote:
    Hi!
    I don't really get what you mean... the Desktop usually is a file manager, isn't it? I'm not sure if Thunar draws the desktop, but Nautilus can even be pretty bitchy if something else (like conky) wants to have a piece. I didn't care enough about rox and its "everything's a folder"-philosophy to take a really close look at it, but there was an option to have it provide a desktop, too, if I remember right. And rox sounded/looks a lot, as it would provide the most "normal filemanager" behaviour when providing the Desktop (didn't try though - maybe I will).
    http://img25.imageshack.us/img25/5576/shot0004bvb.jpg
    Did my best to try to elaborate by using an example there on a screenshot of my desktop. (A sloppy edit done in the GIMP)
    EDIT: What I would be looking for is something contained to that spot, so that way, if I were to right click inside of the rectangle, such as on a file, I would get options with what to open the file, or something else, even copy, cut, paste, or delete.  However, if I were to right click outside of the rectangle, I would get my openbox menu.  Hope this helps make more sense.
    Last edited by ntowakbh (2009-06-13 21:04:43)

  • How to make something like this in Edge Animate?

    Hi,
    I'm hoping to make something like this – https://www.youtube.com/watch?v=OJeDppEHI1g – in Edge Animate but I'm not sure where to start.
    I'm new to Edge but am keen to explore.
    Anyone have any feedback on whether:
    1. It's possible, and
    2. What techniques/effects have been used.
    Thanks!

    Hi there and welcome,
      Could you be a little more specific on what it is exactly that you would want to create? Most of what I can see from that website is doable in Edge Animate, but if you specify what it is you'd like to accomplish I could walk you through how to do it.
    Thanks!

  • It is possible to create something like this in AE?

    Hi, i want to know if its possible to create something like this in AE (not in 3D) but particles that 'builds up' the text in some way? i have a text that is a vector, and the same as PNG, it is possible? Please tell me!

    It's amazing what Google can find:
    Red Giant - RGTV - Sand to Text Transitions
    Something similar from a zillion years ago:
    Flowing Title Effects using Adobe After Effects : Adobe After Effects Tutorial

  • I want to place an image in my InDesign document that can work with an address like this (\Resources\Thumb) rather than this (C:\Users\JSmith\Desktop\InDesign thumbnail Test\001\Resources\Thumb) is this possible?

    I want to place an image in my InDesign document that can work with an address like this (\Resources\Thumb) rather than this (C:\Users\JSmith\Desktop\InDesign thumbnail Test\001\Resources\Thumb) is this possible? In a nutshell I want to point the link to an image in a directory that uses just part of the address.

    I know this is something you can do in Maya with linked files. I guess InDesign just isn't there yet.
    MW Design -  Yeah I think "Relative paths" is the right term! I want to create a Layout with an image in the center of the page - and then duplicate my folder structure with that file. With that, I want to replace the Linked image file with a diferent image file of the same name. In effect having multiple files of the same layout with different images.  I hope that made sense.  

Maybe you are looking for

  • Excise Tab at the time of GRN

    Hi Experts I am not getting Excise Tab at the time of GRN Capturing. Which necessary steps required for CIN settings? Pls help. Thanks

  • Line Items posting in to FB70

    can anybody please explain me the procedure for posting simulated line items in to FB70 transaction through BAPI :  "BAPI_ACC_DOCUMENT_POST". Here I have calculated the tax amounts through FM  "CALCULATE_TAX_FROM_GROSSAMOUNT" . Here I am getting simu

  • Commited Date - in process order

    Gurus, I am creating a process order using a BDC recording. While releasing the process order, Material shortage popup is coming and my BDC is failing in production environment. My issue is eventhough i have enough stock of my component SAP throws me

  • Removing Calculate tax option from F-47

    Hello Sap Guru's, We have a requirement to remove Calculate tax check box option from F-47 screen.Please note the we have already deactivated tax code field.Kindly let us know how it could be done.We even try to make transaction variant for this but

  • Microsoft Outlook 2007 send/receive error with windows 8.1

    I do have an IDEAPAD LENOVO with windows 8.1 Today, i made some updates to my laptop/tablet, and i have problems with the send/receive error on my Microsoft Outlook 2007, before that it was working fine. Someone in the community know how I can fix it