How to make variables optional in void e.g void NAME([optional Var1]) { ..

hi i wanna know if it's possible to make a void or function with optional parameters e.g
void Something(String Variable1){
         if(!Variable1) .......
}is there a way to make the variables optional which means the user can vall the above void by either of
Somthing("TEXT");
or Something();

You can just overload methods in Java.
See http://java.sun.com/docs/books/tutorial/java/javaOO/methods.html
By the way, capitalizing variable names is considered bad practice.
See http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html

Similar Messages

  • How to make the option none in the payment information from app store

    how to make the none option in payment information in app store??????using iphone
    i made a purchase from my card then after i tried to make another purchase that is free but while doing this a massege appears "review your payment information" then it goes back to app store.tell me how to make none option in apple account payment information using iphone??????

    surendramandia wrote:
    i don't want to creat a new account i want  none payment option in my existing account
    This has been suggested by other Users, but have not tried it myself...
    ' ... Get an iTunes gift card & redeem that in iTunes using your existing Apple ID.
    Then the option for none, regarding a credit card should appear...'

  • I have added a 5 songs from a single album and in Ipod it comes as enigma album and in that one song is available and another album named enigma and another song. IT happens for 5 songs also. How to make all the 5 songs in one album name Enigma

    I have added a 5 songs from a single album and in Ipod it comes as enigma album and in that one song is available and another album named enigma and another song. IT happens for 5 songs also. How to make all the 5 songs in one album name Enigma???

    I am working on a friend of mine's 15g ipod(W/dock connector)and I am having the same trouble except it does it to all the songs. I have tried reseting it multiple times, but to no avail.
    I am not sure that this runs on windows XP, it is absolutly archaic (compared to my 5th gen. 30g video).
    Help?
    15g ipod (w/dock connector)   Windows XP  
      Windows XP  

  • How to make Select Options Mandatory?

    Hi Guys,
                  Can anybnody tell me how to Declare  Selection Options for some of them mandatory.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000',
                             v_GRDate for Sy-Datum ,
                             v_GRPrd  for MSEG-GJAHR.
             In these i have to make v_PurOrg Manadatory.
    Thanks,
    Gopi.

    Hi Gopi,
    In order to make select-options mandatory we add OBLIGATORY in the statement like the below.
    Selection-Screen.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000' OBLIGATORY.
    In this case, only the first option will have the default value of 2000.But if you want both the options low and high of select-options, means you have to add the below code in your program in the initialization event.
    Initialization.
    v_PurOrg-low    =   1000. 
    v_PurOrg-high    =   2000. 
    append v_PurOrg.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • How to make seletion optional VA35?

    Hello Experts,,,
    Please guide about " How to make the selection ( customer, material, PO numbed) optional in VA35?
    While doing the search I have found that "validation in Line number 36-44 in PAI include MV75ANEU_EINGABEN_PRUEFEN"
    what does it mean? where can I view this?
    Thanks & Regards
    RaviRaj0308

    VA35N is a simple report. You can copy it and make any changes necessary. It is pulling the same data as VA35 (the same dictionary structure, from what I see, which, by the way, can be enhanced), but for some reason when presenting the data in ALV, it is only using some fields, not all available. It is just one line ABAP change (in the field catalog routine) to adjust this. Otherwise the report is well-written and optimized.
    VA35 (like VA05) is designed to work with a single sold-to or material #, as I explained above. If you need a different report then you need to use or write a different report. It doesn't make any sense trying to break the transaction that wasn't meant to work that way. You actually might be better off with creating a simple query.
    No disrespect to krishna, but I'm an ABAPer and sometimes functional folks just get these wildest ideas without a good understanding of their impact.

  • How to make select-option for one inner table

    Hi,
    Who can teach me to  make select-option for a inner table, which let select-option display data from this inner table.
    Thanks in advance.

    Is this what you are looking for?
    report zrich_0002.
    data: begin of itab occurs 0,
          matnr type mara-matnr,
          spras type makt-spras,
          maktx type makt-maktx,
          end of itab.
    select-options: s_matnr for itab-matnr.
    select-options: s_spras for itab-spras.
    start-of-selection.
      select mara~matnr makt~spras makt~maktx
               into corresponding fields of table itab
                      from mara
                            inner join makt
                               on mara~matnr = makt~matnr
                                        where mara~matnr in s_matnr
                                          and makt~spras in s_spras.
      check sy-subrc = 0.
    Regards,
    Rich Heilman

  • How to make checkbox option enable/disable

    Hello,
    i am newbie in coldfusion...i want to make an option answer after my first check box answer is true
    code :
    <tr>
        <td><table width="100%"  border="0">
      <tr>
    <tr>
        <td>Do you have a car? </td>
        <td><input name="car_type" type="checkbox" value="1">Yes<input name="car_type" type="checkbox" value="0">No</td>
    </tr>
    <tr>
        <td width="100%"></td>
        <td><strong>(Select your car type)</strong></td>
    </tr>
      <tr>
        <td></td>
        <td><input name="car_bmw" type="checkbox" value="1">
          BMW</td></tr>
       <tr><td></td>
        <td><input name="car_mercedes" type="checkbox" value="1">
          Mercedes</td></tr>
        <td></td>
        <td><input name="car_toyota" type="checkbox" value="1">
          Toyota</td>
         <td></td>
        <tr><td>
        </td><td>Others<input name="car_others" type="text" size="20" maxlength="100" /></td>   
      </tr>
      <tr>
    Thank u

    What have you tried? 
    This is a client-side interaction, not server-side, so it should be fairly straightforward to do in JavaScript (I'd recommend using jQuery as it will make things a bit easier).
    -Carl V.

  • How to make one-option dropdown list partial trigger?

    There are two dependent dropdown lists. when list one is selected, the other one will get the SelectItems according the value of list one. My question is: when there is only one selectiem in list one (and the hint 'Please select one..."), how to make it partial trigger in the second time? e.g. I first login and select the ONLY one choice in List one, and the List two gets the values. but the data in datasource updated, so I want to choose the List one again, and make the List two get the new values.

    Hi,
    create a JSF binding (Bindings property on the list component) to a managed bean. The in the code that would trigger the PPR, call
    AdfFacesContext.getCurrentInstance().addPartialtarget(theListBindingName);
    If you have a refresh button, then you could use declarative PPR
    Frank

  • How to make field optional?

    In G/L entry f-02 some of the fields are mandatory. How can I make some of the fields optional? How can I know field status group?

    Hi,
    The Field Status Group is linked to the Field Status Variant which in turn is assigned to a Company Code.
    So if you want to check which Field Status Variant a Company Code has you have to check in IMG company code general data.
    But Generic SAP config allows us to control field stats at Company Code level, Posting Key Level and Transaction Level.
    Hope it helps along with other posts.
    Thanks,
    Praveen

  • How to make dynamic options?

    Is there a way where I can make some code such as a page I'm making allowing you to create your own controller. It will show options in pictures with name underneath of option and prices, then whichever option you click will bring down another set of options but I want the prices that show how much your controller is so far updated each time an option is selected. Is it possible or is there a plugin that can make it possible?
    Example: Create a Controller:
    Choose Controller Type:
    Xbox 360 Playstation 3 Nintendo Wii
    (Picture) (Picture) (Picture)
    (Price) (Price) (Price)
    I clicked Xbox 360 then another set pop underneath with price updated.
    Choose your Xbox 360 Shell Color
    Red Blue Black White
    (Picture) (Picture) (Picture) (Picture)
    (Price) (Price) (Price) (Price)
    And so on...

    Is there a way where I can make some code such as a page I'm making allowing you to create your own controller. It will show options in pictures with name underneath of option and prices, then whichever option you click will bring down another set of options but I want the prices that show how much your controller is so far updated each time an option is selected. Is it possible or is there a plugin that can make it possible?
    Example: Create a Controller:
    Choose Controller Type:
    Xbox 360 Playstation 3 Nintendo Wii
    (Picture) (Picture) (Picture)
    (Price) (Price) (Price)
    I clicked Xbox 360 then another set pop underneath with price updated.
    Choose your Xbox 360 Shell Color
    Red Blue Black White
    (Picture) (Picture) (Picture) (Picture)
    (Price) (Price) (Price) (Price)
    And so on...

  • How to make select option in module pool

    Hello,
    Can anybody tell me how to create a select option in module pool screen..?
    thanks

    Easiest way is to create a subscreen and embed this in your dynpro.
    report zrich_0006 .
    tables: mara.
    * Custom Selection Screen 1010
    selection-screen begin of screen 1010 as subscreen.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_rad1 radiobutton group grp1 default 'X',
                p_rad2 radiobutton group grp1,
                p_rad3 radiobutton group grp1.
    select-options: s_matnr for  mara-matnr,
                    s_matkl for  mara-matkl,
                    s_mtart for  mara-mtart.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    endmodule.
    *&      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
    endmodule.
    * Screen screen 100 with a subscreen area called "subscreen_1010"
    * Screen Flow Logic follows
    *process before output.
    *  module status_0100.
    *  call subscreen subscreen_1010 including sy-repid '1010'.
    *process after input.
    *  call subscreen subscreen_1010 .
    *  module user_command_0100.
    Regards,
    Rich Heilman

  • How to make sound optional in flash?

    I need to edit this flash design. I have not done flash in a
    very long time and have no clue what to do so I need a simple and
    step by step explanation. Currently, the flash design starts off
    with sound and there is an option on the bottom right corner that
    let's you turn it off. I need it to be the other way around. I need
    the flash design to start with the sound off and then have the
    option on the bottom right to turn it on.
    How can I do this? Please explain. Thanks!

    either use mp4 files or use an older ame.

  • Due Date has become mandatory-how to make it optional

    Hi,
    I am posting a vendor transaction using SP GL indicator and the system is giving me Due Date as a mandatory field (with a check mark on the Due Date field to show that it is mandatory).
    Following are the settings which I have already checked:-
    1.) OB41 - Configuration of the posting key which shows Due date as optional
    2.) Field status group of the normal as well as special GL recon accounts - Here also Due Date is optional
    3.) When I go to system --> Status, we are using program SAPMF05A and screen 304. Here also a customised screen variant, if used, is not visible. (However the GUI status is a custmoised one i believe GUI status does not impact this field at all)
    4.) There are no validations in the system. (Even if there were any validations in the system the system would not display a check mark on the field if the field was made mandatory using a validation.
    Is there anything I am missing or is there any other configuration which might impact the field status at the time of transaction posting?
    Please help me urgently.
    Thanks in anticipation,
    Nitish

    Hi,
    I am afraid that might not be the case here.
    I have two separate client, one is development and the other is quality.
    In Development The Due Date field is not visible at all while in quality it is mandatory.
    Adding further, the settings which I have checked are the same in development and quality.
    Thanks,
    Nitish

  • E-mail read receipts - how to make them optional

    Hi,
    Is it possible to turn off "read-receipt" by default, or else to be asked, prior to such receipt being sent, for an activesync based e-mail account?
    When using the e-mail account from my (work) laptop, Exchange read receipts are 'off', always. When reading any mail 'first' on the Q10 though, then any read receipt requested by the sender is sent, automatically.
    I cannot find any (obvious) setting on the handset to toggle read receipts on/off. 
    (I imagine this is BB10, rather than handset specific?)
    Thanks.
    AW

    Hi, any answer on this?
    270 views and no answer? I'd also like to change this default behavior.
    Thanks.
    --- Catalonia, next state in Europe ----
    Use the "solved" or "Like" icons if my answer helped you.
    BES10 administrator for several customers.
    "SMPTE Calculator" timecode APP developer for BB10

  • How to make an input text for user to type name in?

    I'm making a game in which the user can type their name, and later in the game it'll say something like:
    "Oh, Kaitlyn, how was your day?" But all I really know how to do is make it so the name will appear but NOT be in an actually sentence. The problem with that is the spacing and punctuation. I tried following a tutorial which gave me this to put in the actionscript for the output box:
    output_txt.text = "Hello "+myText+"!";
    Here's the tutorial:
    http://www.danfergusdesign.com/classfiles/oldClasses/VCB331-richMedia1/exercises/inputOutp utText.php
    I think it's because it's for as3 that it doesn't work, but I'm kinda new to flash and it doesn't seem too difficult. Please give very discriptive instructions.

    What you show will work in AS2 as well as AS3.  Have you assigned an instance name to the textfield (it shows as ' output_txt ' in your example)?  Instance names are assigned by selecting the object on the stage and entering the name in the Properties panel.
    You need to store the name that the user enters into a variable.  This can be done a couple different ways.  Do you have something in place for that?

Maybe you are looking for