two main() in a project

Hi guys,.

I can create more than 1 main() method in different classes or a project can cause more than 1 main() method? If I can why I might need to do this? advantages and disadvantages of it?

Thank you.

Published by: Garibanus on August 16, 2011 02:19

Garibanus wrote:
Thanks.but what happens if im done with the project and gave it to the users that they will click on the program icon (or I don't know maybe it's something else) how the user will specify which class he wants to start? or how can I say JVM when userwill run program you will start with this (also main()) class first? in this case how JVM will know which hand () it will start?

Generally, if it is a stand-alone program, so only give us write main in the class that loads everything first. Other classes are instantiated in it. For example;

class Add //which does addition
class Multiply //which does multiplication

class Perform //main class which gets load on project start/load
{
    //in this class you 'll write the main method and based on requirement the other classes are instantiated. like
    public static void main(String st[])
    {
             Add obAdd = new Add();   //like this.

    }

}

Avoid us the main write method in web applications.

Tags: Java

Similar Questions

  • Can combine two separate the AE project files to become a 'real' individual project?

    Can combine two separate the AE project files to become a 'real' individual project? I know that you can import a project into AE. But if you delete the original project your imported (outside), you also delete the project imported into your new project. I could have sworn there was a script or function that does this somewhere...

    Any help would be greatly apprecated.

    Thank you

    Thanks Rick,

    Bad choice of words on my part that I meant what you just described. Thanks for your clarification. However, I found the script I mentioned that if anyone is interested. It's called rd_MergeProjects

    http://Provideocoalition.com/mchristiansen/story/after_effects_script_of_the_week_rd_merge projects

    Kind regards

    Louis

  • How build/package two applications of a project?

    Dear all, I have a project of cascades, and I would build two different versions of the app:

    a. a normal version with advanced features disabled, which will be free in BBWorld;

    b. Pro version has with all the advanced features, which will be non-free in BBWorld;

    The app both are based on the same base code, but with a condition variable to enable/disable features. For my permanent title, there are two things to do:

    1. the two applications must have package different name (id) in bar - descripter.xml

    2. the two apps must be built with the settings of different environment variables.

    # 1, I have no idea; # 2, I noticed in the setting of property of project-> build c / c ++-> environment, you can add the new variable, but I don't know how to use it (I tried #ifdef in the code, doesn't seem to work).

    I think it's a good case for many other applications, share a few experiences on how to handle everything?

    Thank you

    Dong

    If you really need to both projects and are not in-app-payment

    I do these things using different branches in Git

    There is a main direction and also one or more custom industries

    then I use cherry-picking or other techniques to have customized branches needed to build specific file bar

    to go this way, you should know what happens behind the scenes of Git and work also disciplined

    Another way would be to put your common code in a library and use this library of two applications

    copy/paste should never be a solution, because it works only after all you are not able to maintain your applications

  • What is the main job for project planning?

    Hi, experts: for Hyperion Planning, which is the main works? I'll list some of the jobs, but I can't get the key point, please advise.

    1 project migration to other ERP planning project?
    2 dimension building?
    3. train the creation?
    4 financial report develop?
    5. company rule of coding?
    6. loading data?
    7. the task
    ...

    For a person who is a developer of planning, which is the responsibility and what is its daily tasks? How much percent of the time on each task?

    Depending on the implementation, one any of them can be time consuming. I would add two scripts more design and calculation (those can be longer depending on the complexity of the implementation. As a developer of aplanning, your responsibility could be one of the tasks according to the skill set of the people working on the project. I wouldn't try to give you sometimes on them as I saw them vary considerably. Sometimes his calc, reports sometimes development sometimes forms development that take the most time.

  • CS4 - how do I re-dock the two main toolbars?

    I accidentally not anchored two toolbars main - those who are at the top. Now they are floating (I think that's the correct word), and it's annoying because they are then placed on my image that I open. Any ideas?

    Thank you and have a nice Easter,L.Z.grab.jpg

    Several ways to do this:

    1. click on window > Application frame.

    It will set the entire into a single image application, as if it were in Windows.

    2. click on window > workspace, select the new layout of the workspace, and then get back to the basics.

    3. slide open the top left image, and then click window and uncheck the Toolbar Options and application, then check again. they should ' dock at top and any image you open automatically opens under them. "

  • I have two main table and details

    Hi all

    I have the detail and mastery of two tables
    desc invoice_master
     ID                                        NOT NULL VARCHAR2(20)
     SALE_ORDER_NO                                      VARCHAR2(50)
     SEASON                                             VARCHAR2(30)
     CUSTOMER_NAME                                      VARCHAR2(300)
     DISPATCH_DATE                                      DATE
    INVOICE_NOTE_DATE
    
    desc invoice_detail
    ID                                                 VARCHAR2(20)
    PROD_ID                                            VARCHAR2(100)
    PROD_NAME                                          VARCHAR2(300)
    PRODUCT_COLOR                                      VARCHAR2(100)
     XS2                                                NUMBER
     S2                                                 NUMBER
     M2                                                 NUMBER
     L2                                                 NUMBER
     XL2                                                NUMBER
     PCS2                                               NUMBER
     TOTAL2                                             NUMBER
     UNIT_PRICE1                                        NUMBER
     UNIT_PRICE2                                        NUMBER
     TOTAL_PRICE1                                       NUMBER
     TOTAL_PRICE2                                       NUMBER
    I insert the data in a master-details three times on three different dates with the same sale_order_no
    I want a request to give me max data (invoice_note_date)

    Please guide
    Thanks vikas singhal

    Published by: vikas singhal on June 14, 2010 12:00

    You want to select data comes from the main table or the main table and details?
    If only the main table, use

    SELECT *
    FROM   invoice_master
    WHERE  invoice_master IN (SELECT MAX(INVOICE_NOTE_DATE)
                              FROM   invoice_master);
    

    SELECT *
    FROM   invoice_master
    WHERE INVOICE_NOTE_DATE IN (SELECT MAX(INVOICE_NOTE_DATE)
                              FROM   invoice_master);
    

    * 009 *.

    Published by: 009 on June 13, 2010 23:35

  • Elastic layout CSS - why there two main column widths?

    In my first all - CSS site, everything was going well until I added content to the pages.

    The layout is elastic 3-column of Dreamweaver with a header and a footer. I also inserted an extra div for a horizontal Spry menu.

    As soon as the content of the main column is less than that of the sidebar, it extends - the top of page three paragraphs may appear about 5 inches wide and everything else below are 6 inches wide. I don't understand.

    See www.krempelsfoundation.org/test/test.html. Any help appreciated.

    You have enough on your #mainContent division left and right margins.  Try this:

    {.thrColElsHdr #mainContent
    margin: 15em 0 0 15em; / * left & right margins = space down the sides * /.
    padding-top: 3em;

    }

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB
    http://ALT-Web.blogspot.com

  • I have two main e-mail accounts and mail is "forwarding" emails sent to one account to the other older account, they arrive a few hours later. Not sure why it's duplicate my emails at all. How can I stop this?

    Kind of hard to explain in the title... who probably is meaningless.

    Basically, I used to use a BTinternet email for any account. But over the years, I went to my iCloud email account. I have both implemented in mail because I still have the BTinternet account that is linked to many things, despite always use iCloud for the new things now.

    However, when I get a message that was sent to my new iCloud account originally, it appear a new message in my BTinternet a few hours later. And it's quite annoying! Makes me think I have a new email, but this is the one I read Twitter.com.

    It's as if there's some rule set up causing Mail to transmit all messages sent to my email from iCloud, to my BTinternet email. I have no idea why this is happening. There is no actual 'rules' put in place for this in my Mail preferences. Don't know what it could be.

    Any ideas?

    Check iCloud.com/Mail, click on the gear at the bottom left, select Preferences, then accounts. The iCloud account is set up to transfer emails?

  • How can I get the opinion of my Inbox to show more e-mails rather than only the two main?

    Normally I would simply place the cursor on the line below and then drag down so more than my emails in my Inbox show. But with this new perspective that doesn't seem to work.

    I assume you are using for your outlook.com e-mail?

    If so, then try to disable the reading pane...

    ... click the "gear" in the top right of your Inbox window. In the drop down menu, under "reading pane", click 'off '.

  • Dungeon of Windows (not), the two Main Internet

    No matter what I do, computer stops responding and does not know what the problem is.

    I have:
    defraged, scandisk and steps all the recommended... nothing works can do any assistance?

    Hi SandeeMoulton,

    (a) what were the changes to the system between the time where everything has worked, and when you noticed the problem?

    I suggest you try the following steps:

    Step 1: Disable the security software and test, follow the steps mentioned below

    http://Windows.Microsoft.com/en-us/Windows-Vista/disable-antivirus-software


    Note:
    enable security software once everything is done.

    If everything works fine, as expected, try to update the security software.

    Step 2: Put the computer to clean and test start.

    Follow step 1 in the link below,

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    If everything works well after a clean boot, you can deduce that some third-party services are at the origin of the problem.

    After find you the program that is causing the problem, you will have to perhaps to update or install a newer version of the program, if you rarely use that you should consider uninstalling the software

    Important: n ' forget not the computer to start normal follow step 7 in the link.

    If the problem persists,

    Step 3: Follow the steps mentioned in the link below:

    Error message when you log on to Windows Vista: "Windows Explorer has stopped working".

    http://support.Microsoft.com/kb/937093

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Two main problems; can be combined (display/activeX controls to image)

    I first noticed the issue several weeks ago, but I can't determine any single event that triggered (for example no virus, no software installation, etc..) Since that time I was pulling on my hair, searching the Internet to find answers, answers MS Search, book search for answers - without success.  I am now trying to put this as a presentation at the forum, and I'll switch to FireFox immediately after, because no clear solution seems to be around.

    Please - someone help me; I have tried everything I have seen/read:

    Question 1: Some web pages display images without problem (www.microsoft.com, www.newegg.com, www.tigerdirect.com, etc.) while others fail to show images at all and seems more text based GUI based. A good test for this was that several web sites including www.amazon.com , which breaks down to show the book covers, Ted images etc., while other pieces show correctly positioned text and links work when you're floating above them and click.

    What I tried (1):

    -During the running MS Internet Explorer for FixIt. clear all the cache (password, internet files, temporary, cookies, forms, etc.); Reseting "default." running a registry cleaner application. After each setting on the net I could find and the similar value, removing all list management web sites. (This is true for both versions of Internet Explorer - 32B or 64B)

    Question No. 2: Installation of the safe places known ActiveX control (for example, Microsoft) do not settle. This applies to both versions of Internet Explorer (32B and 64B). To try to understand what is the problem, I even searched the Internet and followed everything I can find.

    -Linking MS FixIt for IE; clear all the cache (password, internet files, temporary, cookies, forms, etc.); reset to "factory" by default; Run the registry cleaner application. After each setting on the net as I could find and the value as well. remove all list management web sites.

    FAILURE on all fronts... :(

    Additional information:

    After switching to FireFox (if all goes well for only a short time), I followed the instructions to remove Internet Explorer my system.

    It did not work... IE (32B and 64B) remained. Not only he remained, he kept what is wrong with it as well. Still no satisfaction.

    If anyone can help, I would really appreciate it...

    Anyone know of any solution anywhere - little matter how painful?

    Please let me know answer here or by sending a private message or how ever best works for no matter what - I'm going to try anything at this point.

    Thank you in advance.

    FYI: I posted this same question to: http://social.technet.microsoft.com/Forums/en-US/ieitprocurrentver/thread/00d14d60-92e2-46b8-8ecb-5c0beb445f44

    However, this forum does not seem to be technical enough to still offer ideas... I don't know that's the hope!

    Hi Jim,.

    I see that you have some problems with the display of the images, and active x controls on Internet Explorer. I'll help you with this problem.

    I suspect that the use of registry cleaners could have caused some problems.

    Method 1.

    If possible, use the system restore to a date before the problem occurred.

    System Restore: http://windows.microsoft.com/en-us/windows7/products/features/system-restore

    Important: System Restore will return all system files not as documents, email, music, etc., to a previous state. These files of types are completely affected by the restoration of the system. If it was your intention with this tool to recover a deleted file to non-system, try using a file instead of system restore recovery program.

    Method 2.

    If the method above does not help, then run SFC/scannow. After control scan to see if the problem occurs.

    I suggest that you can exercise SFC scan and check if that helps. The SFC/SCANNOW command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    For more information how to make SFC / scan, please follow this link: http://support.microsoft.com/kb/929833

    Let us know if you need assistance with any windows problem. We will be happy to help you.

  • RoboHelp 2015 adapted HTML5: child projects are not displayed in the output of the main project

    Hello

    I have a main and right project currently linking to two projects of the child. I published the projects of the child to the correct file to location SSL of the master project. When the output of the master file, the table of contents of the master project are fine, but no information of the child projects. I searched the forums and other Web site for answers and have not been able to fix my problem.

    Thank you

    MDawn

    Chris

    I'm sorry, it took me so long to look at more in detail, but the good news is that the project you sent me now works correctly in Firefox and IE.

    The problem has been setup. You must build the parent to a folder that will then create the ready files for the child projects. Next, you generate each child in the child's file in the mergedProjects folder in the parent folder. You generated to the! SSL! each project folder.

    I would like to know if you want to send me the version of working with you.

    See www.grainge.org for RoboHelp and Authoring information

    @petergrainge

  • under contract for a project

    HII

    I have a Question,

    I have an organization where A project is to have $ 100000 and he gave a contract for outsourcing of project-B for $ 20000, I need to follow how Project-B performs the work, how can I check the billing for both projects...?

    I'll take a project-B as a subtask in project-A If yes how processes, or should I use INTERCOMPANY BILLING between two business units

    Can someone suggest me,.

    Thanks in advance...

    Hello

    These are the prerequisites

    1 internal defined provider (Ex-interne-Vision operations)

    2. internal Customer defined (Ex-interne-Vision operations)

    3. two projects should be created hand Project & Sub Project

    4. in the controls provider & receiver give provider as defined above & receiving provider as defined above client

    (5 in the main Structures of projects check check of the declaration of A) project as program & B Installer) can belong to more than one program-related projects

    6. for main project partner as an association of subproject task subproject & task form check the box receive Inter project invoices

    7. to the subproject customer & coordinated another project check charge & give the project as the main project number receiver & Details of the customer must be the internal customer defined above

    8 create new agreements for the two projects

    After the above configuration is made to follow the below mentioned process

    1. Enter the expenditures of the project information

    2. generate the inter project invoice project

    3. approve & release project

    4 interface invoice in the Receivables

    5. run the form embraces customer accounts

    6. the invoice is automatically created in Oracle accounts payable

    7 AP invoice Import

    8 post the invoice in Oracle accounts payable

    9. creating the automatic accounting and transfer to GL

    10 interface provider main project costs

    11 performance of the update

    12. costs on receiver project overview

    Concerning

    Shaan

  • Using the modules of different projects

    Hello

    I try to reuse the existing modules of different projects to compile in another new project, but it simply doesn't!

    I have 2 projects with the following modules in them:

    Project: MyModuleProjA1, MyModuleProjA2, MyModuleProjA3

    Project b: MyModuleProjB1, MyModuleProjB2, MyModuleProjB3

    Now, I created a new project called project c, in which I want to use MyModuleProjA2 and MyModuleProjB3 as well as a new module that belongs to this alone, that would be MyModuleProjC1.

    First I tried directly to copy the folder bin-debug the project MyModuleProjA2.swf has and of MyModuleProjB3.swf from the project b bin-debug folder, in bin-debug the project c, but when I ran file main application of Project c, he throwed hell lots of runtime errors, without even loading the initial screen. It was all black.

    I wonder if there is another way to compile?

    I tried searching on the net, who speaks like - link-report = lnkreport.xml - compiler options, charge-externs=lnkreport.xml,-garder-tous-type-seectors = true, - allow-source-path-to overlap = true. But nothing has worked yet (or I'm not using the right way?)

    Basic idea is to reuse the code base instead of duplicating those modules in c. Since there will be a lot of changes\enhancements to these modules, I don't want to encode in two locations all the time want to just maintain the code of the modules in one place and reusing just it is swf in other projects.

    I use Adobe Flash Builder 4.6, but project SDK is A 3.6.

    Appreciate your help...

    Well, I'm not familiar with Maven yet.

    I solved it by changing the module setting to "do not optimize" and resused in my other projects. I think it would be a little bigger in file size it would have been if I had optimized. But it's okay for me...

    See you soon!

  • No way to prevent the dupes in the Premiere project file?

    Due to working with the PluralEyes as well as several editors on the same project, I deal with the importation of many XML and PRPROJ in project files existing files I've worked with.

    This, on a large scale, is becoming untenable because every time I import work of another editor or a synchronized sequence, I receive duplicates of all my assets in the project. I'm trying to understand if there any way to have first check to see if the media is already imported and that the media in the imported reference sequence? If this isn't the case, I'll only to be big project files with multiple references to the same support, because me and my other editors work with the same media, but for different sequences.

    As far as I know, when you import an XML or even a sequence of another project of creation, it creates new key elements for each element used in the imported sequence. It does not recognize that you already have a main part that you use in another sequence which refers to the same media.

    So if you want to keep the two sequences in your project, you must keep the two main elements. If you delete a main element of your bin, it won't stay in the sequence that is references to him, he'll cut off, leaving a big smoking crater where there was once. Even if the sequence is not open now. It's one of the things I loved about FCP7. You could remove each of your master clips and your sequence would be totally unchanged. You could even recreate the main elements by dragging your sequence in the trash.

    I think that if there is really no way to manage these duplicates, it is a HUGE problem for professionals who work in environments with several publishers. It's not just one "well, learn how to deal with a new editing system" - it's actually a deal-breaker; and in fact the only one I see REALLY preventing first to be the choice of go-to post larger houses. This problem becomes so big, so fast that it is true collaborative editing impossible. In my office, we have three people on a project, all the edition revising segments and pass them back. On FCP7, it's simple as Hello - we have just cut and paste between project files and use basic best practices for version control. First, our project files are quickly turning into nightmares and work is often deleted or lost.

    I want to see:

    -Smart handling media in the import of sequences and projects. First must look at the location of the file and folder names and try to recreate a link to any media duplicate. If he stumbles, he must ask for help as the PCF.

    -A media inspection to the consolidation feature. I would love to see an option for the inspection of your project for media duplicate references. When found, first must consolidate automatically.

    -Export of the rationalization sequence. You should be able to export a single sequence. I know there is a version of this in the project manager, but we know all that it should be easier than this!

    Anyone have any ideas on how to solve this problem?

    Experience an extreme frustration with this same in CC 2015! Filled a bug report, I hope really that this can be resolved soon!

    Hi Darius,.

    Please fill your specific frustrations here in a bug report.

    Difficult for me to convince major productions to make the transition to first where exist some small stupid things like this again...

    You can avoid duplicates in many cases, but you must start each project with a few things in mind, especially if you work in a collaborative environment.

    • There will be a 'master' for each production project in which you are working. This project is read/write.
    • You import other projects of other collaborators via inspect the file of the project through the master project of Media Explorer (you can open several Media Browser and save several favorite media browsers). These projects are going to be read-only.
      • These items may be sequences, graphics, music, etc..,.
    • Before starting work on the main project, make sure that you enable 'Write XMP IDS in the files when importing' in Preferences > media.
      • This will tag each media element with a unique ID, which Premiere Pro allows to follow.
      • Then the application will recognize the duplicate items and avoid their display.
      • If a music video, graphics or other media Reference does not exist in the main project, an attachment point is imported to establish a main element.

    You can say "major productions" that it is the method used by the Coen brothers, teams of Assembly and Fincher. If you have any questions, please let me know.

    See this tutorial for the workflow:

    Thank you
    Kevin

Maybe you are looking for

  • Recover photos from iphone, knowing the password

    Hello I'll try to keep it short. 1. my Iphone 4S has got a broken screen 2. I have not used for 1 month (aprox) 3. after replacing the screen, the date has been reset to January 1, 1970 4. the phone is off "try again in 24,000,000 minutes. Facts in b

  • I uninstalled flash player and impossible to reinstall

    I had problems reading of streaming videos and decided to uninstall and reinstall flash player. I am running XP SP3, so I used the Add/Remove programs and uninstalled. Now, I can not re - install. I passed on the adobe site (http://www.adobe.com/soft

  • Satellite C855D-11N and W7 x 64-drivers, software and support

    Hello I bought recently a new Satellite C855D-11N 00F004FR PSC9WE. I want to upgrade the operating system and install from scratch W7 x 64 Ultimate or professional in English. To prepare for installation, I tried to find drivers, software and support

  • Search reverse DNS

    Everyone in general for everyone and any question: Why a website would perform a direct and reverse search for the IP address of the ordering customer before allowing the customer access to the site itself?

  • Impossible to update the CS5 apps in Windows 10

    I'm trying to update to After Effects CS5 Version 10 to 10.02. in Windows, 10. I can't successfully run the updates downloaded using Adobe Application Manager. I get errors for each application indicating "some updates could not be installed" "update