Simple question for some--not me :(

When would be better to use a switch statement and when it would be better to use an if statement.
Can anyone point me to a program or some sites with both working?

However, Switch statements can only be used with primitives and not objects.Do note that this has changed in recent Java versions. Here is the current statement from the Java Tutorial:
"Unlike if-then and if-then-else, the switch statement allows for any number of possible execution paths. A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (discussed in Classes and Inheritance) and a few special classes that "wrap" certain primitive types: Character, Byte, Short, and Integer (discussed in Simple Data Objects ). "

Similar Messages

  • Can anyone answer a very simple question for me ive heard the apple was giving a free iphone 4 or 4s bumper away is there any truth to that?

    can anyone answer a very simple question for me ive heard the apple was giving away iphone 4 or 4s bumpers is there any truth to that?

    Not any more, no. There was a free bumper program back when the iPhone 4 originally came out. It has long since expired.

  • Pro Tools convert to Logic Newbie some simple question for logic users

    Hey guys, I am a recent convert from Pro Tools! and There were just some simple questions I thought some of you may be able to help me out with. I am using Logic 9.1.1
    1) After I set up a multi timbral software instrument (in this case MOTU Symphonic Library) how do I set up midi channels to trigger the individual sounds in the instrument. (in pro tools I used to create a midi track then send an output of that track to that particular soft synth)
    2) How do I set up a and forgive my Pro Tools vocab but basically I want to set up a reverb channel on an aux track have it receive on a bus so I can send other tracks to that particular bus.
    Thanks for the insight and really looking forward to finally make use of all this ram! lol

    1) I have a nord stage and would like record via midi. In pro tools i would usually need to create a midi track with the output set the the nord and an audo aux track to hear it What would I do in order to record midi from my nord stage?
    To record, just select a non-audio track, hit record and play the keyboard. The notes will get recorded into a region.
    If you want to play it back to the Nord Stage as well, then it makes sense to set the Nord up as a MIDI device in your templates, so you can just add the Nord to a track and not worry about what MIDI ports it's on etc. Open the environment, create a New -> Instrument, called it "Nord Stage", set the MIDI port and MIDI channels it's on, and sav your template.
    Now, when you start a song, to sequence the Nord, you just assign the Nord instrument to a track (by for instance, right clicking on a track and choosing your Nord instrument from the list of environment obects that appears).
    2) The multi instrument trick is quick and easy its great but How would I do that manually?
    Lots of ways, look into your key commands, ther are all kinds of "Create track with same instrument", "Create track with next MIDI channel" and so on. There are too many ways to do this to quickly talk about here. In short, all tracks have an environment object assigned to them, whether it's an audio object, or a MIDI instrument object, and this determines where the data on the track goes.
    3) How do you set up midi so that it doen'ts overwrite notes when recording over them?
    Not sure I understand you here...

  • SOME SIMPLE QUESTIONS FOR ALL OF YOU

    hi,
    I have some questions for all of you.
    1. Oracle uses cgi (even asp!!! I've seen an asp page somewhere on an Oracle's site but this moment I don't remember where perhaps it is asp->cgi). Why ?
    Oracle doesn't support their techologies
    (Pl/SQL, Jsevlets,XML) ?
    2. Oracle says that has just released a
    new product for mobiles called "Portal2Go".
    I tried to install this product on NT with OAS 4.8.1.
    I had many problems during the installation and after many tries finally I did it(thanks God). but the problems continue...
    many Jsp errors (from the "tested" supplied apps). My question is:
    a. This product is in an early stage (many installation errors.. just a baby) and I think is stable for Sun Solaris but not on NT.
    b. You Oracle "experts" (i.e. oracle staff, NOT YOU guys) tell me ONE advantage to use you product (I'm an oracle developer for 6 years now):
    You say that I can PORT my existing app in any device and Web (through XML). This is a joke. Mobiles,PalmPCs,Web etc. have different requirements (content,display etc).The scope is different.. so this is absolutely FALSE (to use a boolean).
    This release is user unfrienlty. Why.. tell me WHY to pay for a product and for extra hardware (read the product technical reqs!!) to do the SAME THINK
    I do NOW with existing sources.
    I've developed an app for my company's employees using existing version of DB (8.0.5),pure pl/sql and a WAP GATEWAY.NOTHING LESS NOTHING MORE.
    please answer. Any comment welcomed...
    maybe I'm wrong maybe I'm not.
    PS.WHERE THE WAP GATEWAY/SERVER IS. I searced the cd and..nothing :-) ?
    thanks
    thanasis j.a.
    B.A. in Informatics
    M.Sc. in IS

    Portal-to-Go is a wireless portal server, the first version was released November 1999.
    The problems you describe that mobiles, Palm devices, etc all have different characteristics is one of the key reasons for Portal-to-Go. It allows any service to be displayed on any device by generating content in an appropriate format for specific devices. This way you can take into consideration the size of the screen, the display characteristics, etc.
    It is 'stable' on Solaris and NT, though it is true that the installation procedure of the CD is for Solaris only. The product is not currently available on OTN, so the installer restrictions should have been explained to you when you obtained the CD.
    Why Portal-to-Go? Here's three reasons:
    1. Inherent problems of the User Interface for a wireless device, so we provide a way personalise the UI to improve navigation and allow commonly used parameters to be saved as stored preferences through the portal.
    2. Differences in the characteristics between wireless devices make it hard to support all type without re-creating content and applications for each specific case. With Portal-to-Go, the same service can be accessed from any device.
    3. Lack of content available for WAP and other wireless devices. We have tools to quickly create wireless services from existing Web sites as well as an application platform for creating new Java or database applications for wireless devices.
    You are correct that the product does not have a WAP gateway.
    I'm not sure where you are located, but feel free to contact me offline. I can answer any specific questions, or get you contact with a local Oracle representative.
    At the moment, if anyone wants to obtain a copy of Portal-to-Go, you should contact your local Oracle representatives.
    Paul

  • I can not reset my security questions for some reason.

    For some reason I can not reset my security questions. It keeps telling me it's send ing me an email I get it and follow the directions, but when I get to the security question it just brings me right back to the beginning.     HELP

    Call Apple to help reset your Security Question.
    http://support.apple.com/kb/HT5699

  • Simple question..or not!

    Hi gurus.
    I have a simple question to do!!
    In my ETL map I need to create the follow rule.
    ERP Table to DW table:
    - if ERP table primary key = DW table primary Key then execute the UPDATE command in DW --> THIS IS OK!
    - if ERP table primary key <> DW table primary Key then execute the INSERT command in DW and insert the value 'ACTIVE' in status column. --> THIS IS OK!
    DW table to ERP table:
    - if DW table primary key <> ERP table primary key then execute the UPDATE command in DW and insert the value 'INACTIVE' in status column.
    - if DW table primary key = ERP table primary key then ignore.
    Somebody knows how can I do this?
    Thanks in advanced.
    Bruno

    In my experience MINUS works just fine in this type of scenario where you are comparing two key columns from two tables. You should make sure that both columns are indexed, and that the mapping is running "set based". In this scenario the CBO will do two index sorts and a minus operation to compare the sorted indexes.
    I agree that other methods, like using an outer join and filter, or a "not exists" subquery probably are faster in many cases but if performance is not a real issue, I prefer using minus due to (what I perceive as) better readability of the mapping
    Roald

  • Probably a simple question for ya...

    Ok, so I will start this by admitting I know almost nothing about AS3 and very VERY little about programming as a whole. 
    I'll post my code below and you'll probably think I'm an idiot for not knowing what's wrong with it, but that's ok, lol.  I keep getting "1120: Access of undefined property..." with a whole bunch of different problems, all involving the movement of a character that I'm trying to create for a game I'm attempting to make.  If you can please tell me what I'm doing wrong and if possibly explain it as if I know nothing about programming, it would be very much appriciated.  I've been working on this for a while now and am not getting anywhere, and I just know the answer is something very simple I'm missing.  Once again thank you very much in advance for an answer,
    package
              import flash.display.MovieClip;
                        public class Shooter extends flash.display.MovieClip
                                  public var WalkingSpeed;
                                  public function onLoad()
                                            WalkingSpeed = 5;
                                  public function onEnterFrame ()
                                  if(Key.isDown(68))
                                                      _x = _x + WalkingSpeed;
                                  if (Key.isDown(65))
                                                      _x = _x - WalkingSpeed;
                                  if(Key.isDown(87))
                                                      _y = _y - WalkingSpeed;
                                  if(Key.isDown(83))
                                                      _y = _y + WalkingSpeed;
    Also a quick note is it worked great in AS2 with a few differences but I was told to use AS3 and when I changed it over and rewrote a few things it no longer works, thank you once again.

    Whenever you get errors, you help others to help you by including the complete error messages in your posting.  I cannot say for sure that the following line is a problem, but you can try changing it to see if an error goes away...
    public class Shooter extends flash.display.MovieClip
    change to
    public class Shooter extends MovieClip
    Then you will need to make some changes to update the code to be relevant to AS3.  The Key class does not exist in AS3, so all of your Key.isDown() code won't work.
    Also, _x and _y are x and y in AS3
    You're best bet will probably be to search Google using terms like "AS3 Keyboard move tutorial" to get the info you need to do what you want in AS3

  • Anyone recommend a simple program for keeping notes ?

    More than to do's on calendar. I would like a simple tabbed virtual rolodex that I can quickly click or create the tab I need for a phone call note, or quick thought... Very basic is best, but more advanced program may be ok.
    Curently I use MS word--notebook layout, and can click or crate a tab, name it, and make notes... But I would like something smaller, simpler and on my desk top.
    Thanks! Any ideas would be great. And if by chance it could sync to iphone that would be awesome!

    Some possibilities:
    Notebook http://www.circusponies.com
    Yojimbo http://www.barebones.com/products/Yojimbo/
    Notae http://www.codepoetry.net/products/notae
    Journler http://journler.com/
    VoodooPad http://www.flyingmeat.com/voodoopad/
    Evernote http://evernote.com/
    NoteMind http://www.synium.de/products/notemind/index.html
    Search on MacUpdate there are many, many, many other possibilities
    Regards
    TD

  • Simple Question for R/3

    Hi, Alls
    Question1, what roles and authroz. I need for CCMS alerts in R3 system and auto-reaction method seutp
    Question2, Will I have to configure SMTP first for CCMS (Auto-re-action method)
    Question3, Sould I need to change any profile for that ?
    Please give me simple answer not any URL thanks
    Thanks in Advanced

    Read,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/90/4e313f8815d036e10000000a114084/frameset.htm
    regards
    Juan

  • Links in .pdf work for some, not others

    Hello all,
    I've tried a search on the forums to see if my question might already have been answered, but I didn't find anything, and was hoping someone here might have an idea for me:
    I have two users, each using Adobe Pro 9.1.1 and IE 7.0.5730.13.  They are sent an email that links to a web page that contains links to various pdf documents.  One user can open all the links just fine.  The other can open about half the links, the other half come up with an error that says the document does not exists.  It appears to be looking in the temporary internet folder as opposed to going out and getting the document.  When I try to copy and past the link to the document in the browser, I get the same error.
    I went into the options for Adobe Pro and told it to open the document in a web page, but it insists on opening up Adobe Pro and trying to display it from there.
    Again, two users have the same versions of Adobe and IE and yet have different results.
    Anyone have a suggestion as to what the problem could be?
    Thanks in advance for any help!
    P.

    Thanks for the reply!
    It does not work; if I right-click and select save-as, it is looking in the temp directory for the document, and if you hover over the link, it is trying to send you straight to the temp directory for the document.  Very strange, as looking at the same website on the other person's PC, the link goes out to the correct directory.
    A little clarification; these .pdf files exist on a shared network drive.  Users are sent to a web page that has links to the documents on this shared drive.
    This particular user has the same permissions to that shared drive as the other person does, and all the .pdfs linked in the webpage exist in the same directory on that shared drive.

  • Simple question for you

    Hi.
    I've got a labview program, but i need change something, but i don't know how.
    In attachement is a library and inside is my program in zzz.vi file.
    The program is working, but when I run it. the program ask about a file with data.
    And i need to change that, and it schould work like that:
    When i run this program i sholud do nothing. But when i push the big "OK" button
    the the program should ask about the file and do other procedures ??
    I;ve tried a lot of ways , but it is still not working correct
    Attachments:
    ag33xxx2.llb ‏1077 KB

    Place all your code (including the OK button) inside an event structure and set the event for "OK Button: value changed". That's it.
    If you want to keep the VI running and load a new file whenever the OK button is pressed, place a while loop around it and add an event for the stop button.
    See how far you get....
    (Ideally, you should also add some logic, for example if the operator presses the cancel button at the file dialog, you probably would want to skip the rest of the operations. If this is a subVI, you might also want to set it to "clear indicators when called".)
    LabVIEW Champion . Do more with less code and in less time .

  • Folder size showing for some, not all folders

    I am Mountain Lion 10.8.5.
    This is a common problem, but couldn't find any answers specific to Mountain Lion or my exact problem.
    I wanted to see folder sizes in Finder, which is turned off by default. I went into "Show View Options" and then checked "Calculate All Sizes". I then click on "Use as Defaults" button, which goes from black to gray when I click it.
    I would assume "Use As Defaults" would apply for the entire hard drive. But it seems to be applied randomly. Some folders have sizes, some don't. Sometimes folders will not have the size shown but subfolders will.
    Any ideas?

    Thanks to everyone for their replies - I thought that it was just me with this issue but clearly not. Also thank you to Mil_Prep and S2Linda's suggestions, unfortunately all three of my email accounts do not have a "Mail Days To Sync" option - I believe that this option only appears in Mail settings if the account is an exchange email account. Even if I was able to adjust the time period of emails to sync, I don't think that it would help because the email(s) that are going missing can be as recent as one day old, leaving all my earlier emails in the same folder intact - some of which can go back to the year 2002 for instance. I am still convinced that it is a bug with headers in iOS5. Last week I even had a related problem where I had a new email merge with an old email. The senders email address, subject title and date remained the same but the body of the text was replaced with an old email from 2006! Very odd....

  • Word 2003 - Acrobat menus disappear for some (not all) documents

    I have a user who is having a very bizarre issue with Word 2003 and Acrobat 9 Pro Extended.  When he opens some Word documents, the PDF menus disappear.  They are immediately restored when he closes the document or creates a new document.  We've tried repairing and uninstalling/reinstalling to no avail.  He uses several custom templates, but they are applied at startup to all documents.  Any other troubleshooting ideas?  Could the fact that he's using Word 2003 instead of 2007 be causing the problem?
    Thanks

    More information: I just checked the version of the file I had on my hard drive, and it's doing the same thing there. However, the other similar documents in the same folder on my hard drive are not behaving this way, so apparently it's not specifically
    a SharePoint issue.
    Scott
    Scott Stocking

  • Very simple question for a newb

    I'm working with the 3d camera but somehow when I'm moving in my 3d space, the camera place moves. I'm not sure what im doing wrong to move the camera. Anyway, how can I move my camera and keyframes together from the "Top" view?
    I've done it before, just dont know how.

    You actually answered your own question. Switch to Top view and sure you have record animation turned off . If you can's see the camera and the objects in the view, make sure nothing is selected and press F to fit all scene items into the viewport. If you have the proper overlays turned on, when you select the camera you will see it, and it's motion path. You can now use the adjust tool to click and drag the camera. The keyframes will follow.

  • Palm Pixi simple question for the pros

    How do I block my wireless number from being displayed on an outgoing call, or can it be done?
    Post relates to: Pixi p120eww (Sprint)

    Hello!
    If im interpreting this correctly, you want your number to not be displayed on people's caller ID.  In those cases, 2 ways to do this.
    1.  Use *67 to block calls.  On your phone, dial *67, then whatever phone # you want and dial.  Would need to do this for every call you want you number blocked.
    2.  Contact the carrier to put a block on your #.  Afterwards if you want your # visible, just dial *87 then the phone #.

Maybe you are looking for