Can i use a goto in Java?

i want to be able to get a value from a certain function, and based on that value either keep executing the code or exit the function that i am in (the actionPerformed function). is there a way to exit out of that function once you have already entered it so that it will be in the waiting state again?
like this
public void actionPerformed( ActionEvent event1 )
int dummy = obj.myfunction();
if (dummy == otherDummy)
do something cool
else
send error message
exit the actionPerformed (start over)

Not a goto, no, but you can drop a return statement.
public void foo()
    if (someCondition)
        return 0;
    } else
        if (someOtherCondition)
            x = doSomethingComplicated();
            y = doSomethingElseComplicated();
            return x + y;
        } else return 2;
}

Similar Messages

  • How can i use Unix database in java?

    How can i use Unix database in Java?
    Message was edited by:
    JPro

    I have not a clue about FoxPro, but the db then is FoxPro and not Unix. The better question would be "How do I connect to FoxPro DB running on Unix with JDBC?".
    My answer to that would be, search the Internet for a JDBC driver.

  • How can i use C/Javascript/php/Java in flex?

    can i embed these language into my flex project?
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    please help~

    saipanBETTY0509 wrote:
    Subject: How can i use C/Javascript/php/Java in flex?
    can i embed these language into my flex project?
    You can't.  Why do you want to do this?
    saipanBETTY0509 wrote:
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    I think what this means is "I want to check to see how much hard disk space is available.  Also, I need to check the pixel dimensions of an image."
    Is that right?
    There is no way in the Flash Player (as far as I know) that you can determine the amount of free disk space.  However, in AIR you can use air.File.applicationStorageDirectory.spaceAvailable to determine the storage space available in the application storage directory.
    As far as determining the dimensions of an image, there are plenty of good resources out there on that.  Maybe this one will be helpful to you?
    http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-pr ocessing-local-images/
      -Josh

  • Since i have downloaded the new version of OS mavericks 10.9, i can't use adobe pdf and java anymore (all the softwares are updated) what can i do?

    Hello,
    Since i have downloaded the new version of OS mavericks 10.9, i can't use adobe pdf and java anymore (all the softwares are updated) what can i do?
    thank you for the help

    Uninstall version 6, Google for a download site for version 5.1. Problem solved.

  • Can I use Streaming Video in Java Application?

    Will i be able to use Streaming Video in Java Application, if yes can anyhow out there pls teach me how to do it... thanks...

    read up on the Java Medai Framework http://java.sun.com/products/java-media/jmf/index.html

  • Can I use regular expressions in Java 1.3

    Hi,
    Dose Java 1.3 suport regular expressions?
    How can I use it?
    Thanks.
    bevin ye

    The 1.3 core API doesn't support regular expressions. Hint: There's an item "Since:" in the JavaDoc of most classes that indicates the version it was initially available. If you look it up in the JavaDoc of java.util.regex.Pattern you'll notice that it's value is 1.4.
    But there are several third party libraries that implement regular expressions, 'though I've not used them extensivly, so I can't tell you which one's the most usefull.

  • Can't use certain characters in java programs.

    For some reason I cannot use characters like: " ^ ~ | " in java programs.
    I can type them in a terminal and then paste them into the program, but cannot type them inside the java program - It's has been like that in every java application I have used. It only works when typing them in a applet running on a browser.
    Im running Linux RH 7.2 with JDK1.4.0 (It works fine in windows 2000)
    Hope somebody can help me.
    /Tommy

    Ehmm. What makes you believe that it isnt?
    I can't make exclusiveOr operations and if(bubba || bubba2) something....And that is a problem / annoyance.
    I can type every other characters but those ��� works fine as well.

  • How can I use Servlets on Sun Java System WebServer 6.1

    Hi
    This is Khurram,
    I have just downloaded, and installed "Sun One Java System Web Server 6.1" on WindowsXP. This is installed and working properly on my system. But I want to use Servlet technology on this server, even I did download it just for working on servlets. Before it, I was using typical JavaWebServer2.0 for this purpose.
    Any ways.
    Can any one tell me, how can I do this on "Java System Web Server 6.1".
    Thanks
    any help will be appriciated
    regards
    Khurram

    Thanks for your such action.
    Actually I have installed it since 2 days, and have read throughly the documentation of WebServer, But Only the Link for this purpose is provided "Programmer's Guide to Web Applications", Now I have just searched for it and found only "Programmer's Guide" .PDF format. I have just read it out now, But here also provided a small refference to see "Programmer's Guide to Web Applications". Now I have just the problem that where to find it.
    Please, tell me if you have some solution to my problem
    or atleast tell me where to find the refference "Programmer's Guide to Web Applications". I tried but only found "Programmer's Guide" for Sun Web Server 6.1.
    Thanks any way to give some time.
    Khurram

  • Can we use JCE embedded into JAVA 1.5 outside USA and Canada?

    Hello all,
    in the old JCE 1.2.2 (http://java.sun.com/products/archive/jce/) where was a restriction: RESTRICTED TO THE UNITED STATES AND CANADA. If you do not reside in the United States or Canada, you will not be able to download this software.
    Is there the same restriction also in the embedded JCE into java 1.5 ?
    I can not see any restriction. is it correct?
    Could you give me the link where I can find the restriction or the license and term of use about JCE embedded in JAVA 1.5?
    Thanks
    Matteo

    Those restrictions were lifted during the Clinton administration.

  • How can I use JVM  instructions from Java classes?

    Hello,
    I want to use JVM instructions in my Java classes. How can I achieve this?
    Should I include a library to my project or something else?

    What on earth are you talking about?

  • Can't use Swing in my java application

    I installed J2SE 5 Update 4 on my machine and was trying my hands on creating GUI using swing. I kept getting the error message: "Package javax,swing not found in import".
    I have the statement: import javax.swing.*; in my code so I don't what to do again.
    Thanks

    I think your best bet is to try uninstalling and installing Java again. Your problem could be something small, however you wull eaist less time to re-install everything, then to try searching for the problem.
    btw-What Development tool do you use? Just in case you may try to check whether it could be a problem of the ide (It should not be however), just check with another Ide, and see if the same happens. If yes, then follow my first advise, I think it would take you less time.

  • How can  I use COM technology in java.

    I have one assignment in to which I have to build GUI in java and back end processing in VC. Is that possible.?? IF yes How ??
    COM componet might be one solution but how todo that in java.

    There's a package out there somewhere for doing COM from java, google should find it for you.
    Or you can create a DLL with your C++ code and write it to be invoked by JNI from Java.

  • Can I use log4j with a java stored procedure

    I have code that resides on the middle tier and on the database. Our company is using log4j for debugging purposes. In order to get my code to work on the database, I have had to remove all the log4j stuff. Has anyone tried to get code that has log4j messages to run on the database? I am not concerned with actual debugging, I just don't want to have to strip this code out if I can avoid it.

    Hi Laura,
    As far as I know, you have two choices:
    1. Load the log4j classes into the database (using the "loadjava" tool).
    2. Enable remote invocation of log4j classes via RMI (or similar).
    Hope this helps.
    Good Luck,
    Avi.

  • Can I use jaxm to build java/tcp based distributed apps?

    I�m interested in exploiting the capabilities of messaging providers in a standard tcp-based distributed app. Is it possible or jaxm/soap is http based?

    JAXM can be http based if you use the SOAPConnection.

  • How can I use MS Word within java programming

    Hi everyone!
    I am developing a Java program that will take data
    from an Access 2000 database, and manipulate it,
    display the results graphically and in tables. The
    challenge for me is that I want the program insert the
    graphics and tables into the MS Word template and then
    prompt me to save it as a word * .doc. Do you know
    of any articles or sources of sample code on how to do
    this. The Java environment is Java2, JDK 1.3,
    JBuilder4. The OS environment is XP.
    Regards,
    Farad

    Hi, I also need that package. my e-mail is [email protected] Plese send me that. Thanks in advance
    I have a package that will do this for you. I just
    need to get your email to send an attachment and
    examples.

Maybe you are looking for

  • Where to place crossdomain.xml in SAP ECC IDES?

    Hi, I have a flex application which uses webservices generated in SAP IDES system. This flex app is stored in portal server. Since the physical servers are involved, I get a security error message, which says, "Security error accessing url". I browse

  • Javascript within an iframe is not rendering

    We have an iframe on a page within our Portal that does not render completely. We are attempting to render SocialText.net within an iframe and it seems that Firefox is blocking the javascript that is attempting to run on the page. The page loads succ

  • How can I eliminate duplicates in Outlook

    My iPhone 4 and iMac (Outlook) were out of sync. I synced them through iTunes and I now have duplicates in Outlook. How can I eliminate them in Outlook. My thought is to sync my iPhone with Google Contacts, eliminate the duplicates, and somehow load

  • Static used on global variable declaration

    I have inherited a CVI project that contains a single .C file and a couple of .UIR files with their associated .H files. Many of the global variables have STATIC in their declaration - I believe this is due to the fact the original developer original

  • Xcelsius 2008 cannot install

    Hi all, A customer cannot install Xcelsius 2008 on XP Home 2002 with SP2, with Office 2003 installed.  There error message are "Office XP application : Excel, Word, Outlook or Powerpoint must be pre-installed.  Higher versions work fine".  Anyone enc