What's the difference between Main ( ) and Main { } ?

I have been searching around, but still no luck finding the difference between Main ( ) and Main { }. I found that java uses ( ), and javafx uses { }. But in javafx I can still use ( ). Is there different meaning?
Thanks.

I am not sure what you mean, but I will take a guess.
Remember just one thing:
1) You can easily instantiate a class to an object in JAVAFX using a JAVA or JAVAFX class, but in JAVA you can only instantiate JAVA objects.
(Not completely true. If you really want a headache then you can instantiate JAVAFX classes in JAVA, but it is not easy.)
Let me give you the following class that contains some variable:
JAVA
class MainJava {
     int     blaInt;
     long    blaLong;
     String  someString;
     String  anotherString = "(First Bicycle) Look mom no Hands... Look Mom no teeth.";
     public MainJava() {
         // Before this contructor runs all variables will first be initializes to their default values or whatever you put in them above
         // Construct things :)
     } // END CONSTRUCTOR for MainJava
} // END CLASS MainJavaJAVAFX
class MainJavaFx {
     var     blaInt : Integer;
     var     blaLong : java.lang.Long; // The most usefull number made difficult in JAVAFX :(
     var     someString : String;
     var     anotherString = "(First Bicycle) Look mom no Hands... Look Mom no teeth."; // Thats nice. No need for a type :) Heaven ... I'm in Heaven
     init {
         // Before this contructor runs all variables will first be initializes to their default values or whatever you put in them above
         // Construct things :)
     } // END CONSTRUCTOR for MainJava
} // END CLASS MainJavaFxThese 2 classes are affectively the same.
One written in Java and one in JAVAFX.
You already seem to know JAVA so I am going to talk in JAVAFX code from now on.
1) To instantiate a JAVA class in JAVAFX is the same as in JAVA.
  var myNewObj = new MainJava();2) To instantiate a JAVAFX class in JAVAFX you do the following.
  var myNewObj = MainJavaFx{}; // Weeeee .. easy hey :) I likeThink of init{} as the contractor of the class in JAVAFX, because there is no more constructors in JAVAFX like in JAVA.
Also in JAVA you can pass parameters to the class constructor, whereas in JAVAFX that is not possible anymore.
So sad, but what JAVAFX taketh away ... JAVAFX giveth so muchth moreth ... th...
Now witness the power of ... JAVAFX ...
In JAVAFX you can instantiate any "var" variables when you create the object from the class.
Therefore you do not need to pass parameters to the init constructor, most of the time you do not even need init.
So lets say you want to give the class variable other default values in the JAVAFX class then you can do it like this:
  var myNewObj = MainJavaFx{ 
                                               blaLong : java.lang.System.currentTimeMillis()
                                               blaInt : 1234
                                               someString : "Going to the Hospital I see"
                                               anotherString : "Thorry Mom."
                                      }; // Weeeee .. easy hey :) I likeNow isn't that nice.
Keep in mind that the init{} and postinit{} code blocks will only run if they exist after the object is created and therefore the variables will already be changed to the values you have given them when you instantiated the class.
Cool hey :)
You can not do that to a JAVA object, but then again if you need to change the class variables of a JAVA object then just create a constructor that takes paramaters and update the class variables in the constructor.

Similar Messages

  • What's the difference between 2nd and 3rd generation

    PLEASE HELP! New Apple user and looking to purchase a used 2nd or 3rd generation ipod touch.
    what's the difference between 2nd and 3rd generation?
    apparently I am told that the 2nd gen does not have the capabilities of listening without headphone? and the 3rd gen does??

    Hi maximumslowness - (great name),
    The 2nd gen Touch has one internal speaker, so you can listen to it, (both left and right channels) without headphones.
    However - it's a small single speaker and it is not very loud. It's not designed for quality listening (neither is the speaker on the 3rd gen as far as I know) and probably will not be adequate if there is a lot of background noise nearby.
    One option is to drop the iPod (not literally!) into an iPod Docking station so that the sound can play out through a self-contained mains-powered amplified speaker, which will also charge your iPod. There are many on the market. On the bottom of the iPod is the 30-pin dock connector which can be used to feed the audio to a docking station. Another option is simply to use a cable to connect from the headphone socket to the audio input on any amplifier.
    Yet another is to plug in a small fold-up style speakers, such as
    http://www.amazon.co.uk/Portable-Folding-Speakers-iPods-Players/dp/B000A1QKNU/re f=sr_1_84?ie=UTF8&qid=1332326622&sr=8-84
    or http://www.amazon.co.uk/Generation-Capsule-iPhone-Laptop-Speaker/dp/B002XNO7FQ/r ef=sr_1_6?ie=UTF8&qid=1332326656&sr=8-6
    I've no idea how good the sound is, you'll have to judge that for yourself. The links are both to a UK store, but most countries will have a similar option.
    I do not recieve any form of payment or compensatiion for the above links.
    Message was edited by: the fiend

  • What is the difference between subroutine and function module?

    What is the difference between subroutine and function module?

    Hi,
    they can both return values.
    FMs are mainly used when a routine is to be performed by many programs.
    Subroutines (forms) are generally only executed within one program.
    You can perform routines from other programs, but it's not often done.
    both forms and FMs are reusable modularization units.
    To distinguish we generally say that forms are used for internal modularization and
    FMs are used for external modularization.
    To decide on which to implement, consider whether you need the content to be used just for a limited program
    or wheteher it can be called from many independent programs.
    For the first purpose it is better to implement a form whereas for the second we implement an FM.
    However, ABAP does not isolate the usage context.
    That is; you can call a form from another program within whose code the form is not actually implemented.
    However, this requires attention since the form may utilize global variables.
    The same issue holds for FMs.
    FMs are encapsulated in function groups and function groups may have global variables that can be globally
    used by all FMs inside it.
    Thanks,
    Reward If Helpful.

  • Could any one tell me what is the difference between swfloader and module loader?

    Hi  All,
                          Could any one tell me what is the difference between SWFLoader and Module Loader in Flex3 in detail?

    Hi,
    ModuleLoader is a kind of strange API that is really just intended to look like SwfLoader for modules that contain a single visual component, and hides most of the module loading infrastructure, which is all about class factories.
    What I mean by "only loaded once" is that if you have several places in the code that call the ModuleManager.getModule("url").load() call, it will only ever get loaded over the wire and interpreted once, subsequent "loads" will just re-dispatch pseudo-load events to the new client.  In other words, the class factory is a singleton for a given url. Unloading is a totally different story.  As you note, not everything is truly unloadable, because there may be lots of references to stuff in
    the module that will keep it alive and un-GC'ed.
    I suggest playing with the low-level API so that you understand the backing implementation, and this should help you understand the limits of ModuleLoader.
    The main difference between modules and applications is that modules have lower overhead, and they only ever get loaded once, no matter how many times you load them. If you're using the ModuleLoader API, keep in mind that you're losing about half the functionality of the module system.  I will assume that you are, because otherwise it would be obvious where to expose methods.  You might want to play around with the lower level ModuleManager API just to get a hang of what's going on - ModuleLoader is a pretty thin veneer over the lower API.                
                    Basically, what you want to do is to have your module implement an interface, say IModuleWhatever.
    Also try and refer to this link which was previously discussed in this forum..
    http://forums.adobe.com/message/74404
    Thanks,
    Bhasker

  • What is the Differences between Caingorm2 and Parsley(Caingorm3) ? Very Urgent ...plz help me out..

    Hi all,
            I am familier with caingorm 2 , and i am new to parsley , can any one give  differences between caingorm2 and parsley(caingorm3) ?
    and also please
    1)how to create a BeanConfig.mxml configuration  file in parsly ? how many ways we can inject beans in BeanConfig.mxml
    2)and how the event dispatched in parsly and handled by parsley step-by step?
    3)please explain by taking a small example insert usename and password in to data base using LCDS ?
    thanks
    -Balu

    Hi
    You can refer the following links for your question.
    Difference between AET and EEWB
    What is the use of AET? What are the differences between AET and EEWB?
    Difference between EEWB - UI Configuration Tool - AET
    http://senthilsapcrm.wordpress.com/2010/02/04/adding-custom-fields-in-sap-crm-7-0-using-aet/
    What is the main difference between eewb and aet tool ?
    Hope it is useful.
    Thanks and regards
    Preeti Viswanath

  • What is the use of AET? What are the differences between AET and EEWB?

    Hi,
    I would like to know about AET? What is the use of AET? What are the differences between AET and EEWB? Please help me out?
    Thanks,
    Satish

    Hi
    You can refer the following links for your question.
    Difference between AET and EEWB
    What is the use of AET? What are the differences between AET and EEWB?
    Difference between EEWB - UI Configuration Tool - AET
    http://senthilsapcrm.wordpress.com/2010/02/04/adding-custom-fields-in-sap-crm-7-0-using-aet/
    What is the main difference between eewb and aet tool ?
    Hope it is useful.
    Thanks and regards
    Preeti Viswanath

  • What is the difference between Campaign and Trade Promotion?

    hi experts,
    What is the difference between Campaign and Trade Promotion?
    regards,
    babu

    Hi,
    Campaign serve operative marketing planning. They describe actions that are carried out, for example mailing actions, product promotions, and telemarketing. Crieria such as target groups, products, documents, people responsible, and the budget are defined in the campaign for these activities.
    Campaign are basically used for operative marketing planning and execution.
    Trade Promotions are Marketing activity used by industries that sell into the retail channel or through brokers or wholesalers. A trade promotion takes place within a specific time period and aims to increase brand capital, brand awareness, and market share. It is also used to increase sales volume or to launch new products or product lines.
    Trade promotions are structurally similar to other marketing objects, except that trade promotions are targeted at a key account.
    A trade promotion has a header that provides overview information about the trade promotion, such as the intended key account, the product planning basis, the trade promotion objective, funds plan details, and trade promotion status.
    Assignment blocks contain specific information pertaining to, for example, trade promotion dates, products, and causals.
    For more information on Trade Promotion please go through the following link:
    http://help.sap.com/saphelp_crm60/helpdata/en/eb/aa80ae2ea44778a987960a847fc6ce/frameset.htm
    Main difference is campaign is an operative instrument to manage the interactions between the customers and the system

  • FV70 what is the difference between Park and Save as completed?

    HI,
    Can anyone explain, what is the differences between Park and Save as completed in t-code FV70?
    in FBV0 post park document, I still can post both document?
    Thanks

    Hi,
    The main difference between park and save as completed is that in "Save as Completed", system do some checks as it do in posting the ocuments, like:-
    (1) Balance should be zero.
    (2) All lines should have been filled with the required data.
    (3) There should be at least two lines in the document.
    Regards,
    Gaurav

  • What is the difference between task and change request?

    Hi all
    What is the difference between task and change request?
    thanks all

    Dear Ispit,
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/19/3f5bf8a4b011d285090000e8a57770/content.htm">Request Types and Task Types</a>
    <a href="http://help.sap.com/saphelp_sm32/helpdata/en/dd/cc86a571464559a2685a404397065b/content.htm">Change Transactions in Change Request Management</a>
    For more information about the SAP Change and Transport System (CTS), visit the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/57/38ddff4eb711d182bf0000e829fbfe/frameset.htm
    Transport Request is generated in following scenarios:
    1. Customizing Request - When doing or changing some customization.
    2. WorkBench Request - When configuration is cross-client. Eg Generating new Table, making changes in access sequence, Abap development, etc.
    Transport request is not generated for Master Data. For eg: Customer Master, Material Master, price master, etc.
    Benefit of Transport Request:
    SAP Landscape normally has 3- Tier system:
    Development Server - Where customization takes place. Transport request is generated at this level & then first transported to Quality server for testing whether it meets the requirement or not. Once the requirement is met in Quality server then Request is transported from Development Server to Production Server (Actual / Live System)
    Quality Server - Mainly useful for testing.
    Production Server Actual / Live server, where the real transactions are created & posted.
    Procedure to Release & Transport Request:
    1. In development server, go to T.Code: SE10 & select the check box Modifiable & enter
    2. In the next screen, you will see list of transport request created.
    Note: Transport request consist of main request along with sub request. These sub request hold the object to be transported.
    3. Expand the main request & you will be able to view the sub requests attached to main request.
    4. First release the sub requests.
    Note: To release the request, select the request ni & click on release request individually (Do not select release all request)
    5. Next release main request.
    6. Once the request is released sucessfully, imform the basis person to import the request to QA server.
    or
    If the authority is with you, through T.Code: STMS, select development server --> select request no & release to QA server. Here when it pops up client no, user id & password, maintain it of QA server & release the request to QA server.
    Reward points if this is helpful.
    Regards,
    Naveen.

  • What is the difference between UP and Down Streams

    Hi
    What is the difference between UP and Down Streams and
    Regards
    Surya

    Hi Surya,
    The petroleum industry is usually divided into three major components: Upstream, midstream and downstream, though midstream operations are usually included in the downstream category.
    Upstream - Upstearm oil sector is a term commonly used to refer to the searching for and the recovery and production of crude oil and natural gas. The upstream oil sector is also known as the exploration and production (E&P) sector.
    The upstream sector includes the searching for potential underground or underwater oil and gas fields, drilling of exploratory wells, and subsequently operating the wells that recover and bring the crude oil and/or raw natural gas to the surface.
    MiddleStream - The midstream industry processes, stores, markets and transports commodities such as crude oil, natural gas, natural gas liquids (LNGs, mainly ethane, propane and butane) and sulphur.
    DownSTream - The downstream oil sector is a term commonly used to refer to the refining of crude oil, and the selling and distribution of natural gas and products derived from crude oil. Such products include liquified petroleum gas (LPG), gasoline or petrol, jet fuel, diesel oil, other fuel oils, asphalt and petroleum coke.
    Regards
    Sunil

  • What is the difference between ABAP and BADI

    What is the difference between ABAP and BADI

    Hi
    BAPI is different from BADIs and User exits in ABAP
    BAPI : BAPI basically works like a function module. the major difference being that it can work like a RFC. That means it can work from system to system. Mostly the name of a BAPI can be seen in se37 by just giving BAPI_* F4 and you will see a lot of BAPIS.
    BADI : BADI is a new concept and are also known as Business Addins. SE18 and SE19 are the two transactions which are used to make a BADI. Mostly BADIS are not made but selected from what is given in SAP. These are similar to user-exits but are method based. One can say it is an extension to the user exits. If one has an issue in which one has to change so existing things in SAP then BADI can be used. First one has to define it and then find out a suitable implementation for the issue concerned
    User-exits : there are many types of user exits like Function exits , Menu Exits Screen exits etc. These are used when there is an issue of changing SAP given screen or menu or report.. Main transactions which are used in these cases is CMOD and SMOD. One can find out the user exit concerned and change it accordingly as per ones requirement
    to be more specific in answering in singel phrase
    1.user-exit and badi are related.
    2. But BAPI is something entirely different.
    3. user-exit and badi.
    BADI is nothing but user-exit,
    BUT CLASS/OO based. thats all.
    4. BAPI is nothing but a FUNCTION MODULE only,but its RFC Enabled.
    Santosh

  • What is the difference between APL and UAFL?

    Hi There,
    Can someone please tell me the difference between APL and UAFL?
    As per my understanding APL stands for Automated Predictive Analysis and these are the set of algorithms which SAP inherited with the acquisition of KXEN and APL is enabled from SP9 onwards.
    So what is the difference between APL and UAFL?
    Can someone answer this?
    Regards,
    Arjun

    Dear Arjun,
    the main differences beetween AFL and APL are coming from the A of APL: Automated.
    Both AFL and APL can be used the same way (integrated into application), but the APL are Automated algorithms that are coming from InfiniteInsight technology. They give you the opportunity to perform advanced classification, clustering, regression, etc... without deep knowledge in predictive algorithm or data enconding as well. On the contrary, using AFL requires that you choose the right algorithm for answering your question, then set the specific parameters for that particular algorithm (ie: you now the algorithm and how to play with), you have to encode by yourself all the existing variable into the numerical space and handle by yourself binning, banding, missing values and outliers. All those mandatory steps are done Automatically using the APL algorithms.
    Kind regards,
    Gaëtan.

  • What is the difference between #variable_name and :variable_name?

    Hi!
    What is the difference between #variable_name and :variable_name?
    I have found that if we use alphanumeric variable then :variable_name return value in quotes but #variable_name without quotes.
    Why it does not work in the same way for variable default values when variable is used in filter? (It works in mapping)
    I use variable in filter like T.OUT_DATE>convert(datetime,:LAST_UPDATE_DATE,121)
    When I use my variable in package and do refresh it works fine. But when I try to execute the same interface with variable default value I get error. Seems that variable name has been not changed to the value. It does not work with default value in quotes neither without quotes.
    Any ideas how to solve that?
    Thank you in advance!
    Edited by: user13278245 on Sep 15, 2010 4:34 AM

    Question is how to make it work with default value, when I execute interface standalone, not in package? And why it works in mapping but not in filter?
    + I have found that it works if source is Oracle. It doesn't work only for MS SQL source.
    Edited by: user13278245 on Sep 15, 2010 6:43 AM

  • What is the difference between start() and run()

    Hi:
    what is the difference between start() and the run()???
    in my app, i have
    Console.debug( "starting thread to listen for clients" );
    _server = new Server( this );
    _server.start();
    _server extends Thread..
    why everytime i use server.start(); my app will terminate on it is own, even though in my servr.run() method, i have a while loop
    and if i call _server.run() explicitly in my code, that while loop will be in execution
    can someone let me know??
    thnx

    what is the difference between start() and the
    run()???start() is a method on Thread that tells it to start.
    run() is a method in the object that the thread executes.
    why everytime i use _server.start(); my app will
    terminate on it is own, Err.... I'm not convinced this is true. It'll throw an IllegalThreadStateException, if you try to restart an existing thread.
    If that's what you're saying.
    even though in my _servr.run()
    method, i have a while loopI don't see the connection. Are you saying that the while loop never terminates, and you don't see why the thread is terminating?
    and if i call _server.run() explicitly in my code,
    that while loop will be in executionIf you call server.run() explicitly, then run() will be executed in the same thread that you called it in.

  • What is the difference between exists and in

    hi all
    if i have these queries
    1- select ename from emp where ename in ( select ename from emp where empno=10)
    and
    2- select ename from emp where exists ( select ename from emp where empno=10)
    what is the difference between exists and in is that only when i use in i have to bring the field name or what.... i mean in a complex SQL queries is it will give the same answer
    Thanks

    You get two entirely different result sets that may be the same. Haah! What do I mean by that.
    SQL> select table_name from user_tables;
    TABLE_NAME
    BAR
    FOO
    2 rows selected.
    SQL> select table_name from user_tables where table_name in (select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    FOO
    1 row selected.
    SQL> select table_name from user_tables where exists(select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    BAR
    FOO
    2 rows selected.So, why is this? the WHERE EXISTS means 'if the next is true', much like where 1=1 being always true and 1=2 being always false. In this case, where exists could be TRUE or FALSE, depending on the subquery.
    WHERE EXISTS can be useful for something like testing if we have data, without actually having to return columns.
    So, if you want to see if an employee exists you might say
    SELECT 1 FROM DUAL WHERE EXISTS( select * from emp where empid = 10);
    If there is a row in emp for empid=10, then you get back 1 from dual;
    This is what I call an 'optimistic' lookup because the WHERE EXISTS ends as soon as there is a hit. It does not care how many - only that at least one exists. It is optimistic because it will continue processing the table lookup until either it hits or reaches the end of the table - for a non-indexed query.

  • 1)Now I use Lightrom 5.7 how to upgrade to 6 or CC? 2) What is the difference between 6 and CC vercion? 3) When I used lightromm 3, I could see inEXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is ve

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    2) What is the difference between 6 and CC version?
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    Purchase the standalone upgrade from here: Products
    Download CC version from here: Explore Adobe desktop apps | Adobe Creative Cloud
    2) What is the difference between 6 and CC version?
    See this comparison chart: Compare Lightroom versions | Adobe Photoshop Lightroom CC
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?
    Rob Cole's ExifMeta plugin displays the Subject Distance field (and much more).  Unfortunately, his Web site appears to be down again.  He used to be very active here, but he hasn't posted in several months.

Maybe you are looking for

  • After advance payment made against PO system is allowing for ammendment

    Issue  is there is a PO for some amount 5000 as per purchase request we have made an advance payment  Later on we have learned that they have decided to cancel the freight cost as indicated in our PO and subsequently amended the PO value to INR 4500.

  • "Error Details" is empty...

    When ever I've got an error in the ESB Control instances, and tryr to open the the error tab page - the dialog is completely empty? Is this a bug or? Regards, Henrik

  • [svn:osmf:] 13942: 1. Set the default value of _manualSwitchMode back to false

    Revision: 13942 Revision: 13942 Author:   [email protected] Date:     2010-02-02 13:02:47 -0800 (Tue, 02 Feb 2010) Log Message: 1. Set the default value of _manualSwitchMode back to false 2. Remove the setter of client property and change relevant me

  • Pixma MX922 - BK appears to be out of alignment. PGBK, C, M, Y all (relatively) perfect.

    Hey all, I've actually submitted this to Canon support, but I thought I'd bring up the issue since it's pretty strange and I would think that anyone familiar with it might see this post and go... "Oh hey, I know that!" So... Pixma MX922... I appear t

  • Unable to create PReqs

    Hi, I am just testing simple Heuristics with one DC and one vendor. - I have a 3 products, for which i created few demands at DC, i am running Location Heuristics with all my selection as 3 products, and included Vendor , DC in location field. - Ther