Expressions and operators

Hello
quick question
is
count--;equivalent to
count = count - 1;meaning they produce the same output...

corlettk wrote:
That's it... I stick to my rule.... NEVER, never, never decrement and assign in one statement.... It's just too confusing for a moron like me.You can even call decrement on Double (or other numeric wrapper types):
Double a = 1.0;
a++;
++a;
System.out.println(a);The above prints 3.0
Or, try this:
import java.util.List;
import java.util.ArrayList;
public class Test {
   public static void main (String [] args)
      Integer a = 1;
      Integer b = a;
      a++;
      a--;
      System.out.println("a and b:");
      printOutput(a, b);
      System.out.println();
      Integer c = 1200;
      Integer d = c;
      c++;
      c--;
      System.out.println("c and d:");
      printOutput(c, d);
      System.out.println();
      List<Integer> list = new ArrayList<Integer>();
      list.add(d);
      d++;
      System.out.println("List: " + list);
      System.out.println("d: " + d);
      System.out.println("list.get(0) == d: " + (list.get(0) == d));
   public static void printOutput(Integer left, Integer right)
      System.out.println("left, right: " + left + ", " + right);
      System.out.println("left == right: " + (left == right));
      System.out.println("left.equals(right): " + left.equals(right));
}Output:
a and b:
left, right: 1, 1
left == right: true
left.equals(right): true
c and d:
left, right: 1200, 1200
left == right: false
left.equals(right): true
List: [1200]
d: 1201
list.get(0) == d: falsea and b are == because of caching the values of certain Integers.
c and d are not == because they aren't cached.
You put d into the list, but you don't get the same value back out, because the ++ assigns a new Integer instance to the reference d. That makes sense, as you wouldn't want a mutable Integer. Calling d++ doesn't affect the Integer instance that was put into the list, which also makes sense. It's the same as setting d to a new Integer explicitly:
d = Integer.valueOf(5);This assignment obviously wouldn't affect the Integer in the list.

Similar Messages

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

  • I am traveling with my macbook pro and I forgot to install final cut express and quicktime pro before I left. How can I in a way download them for free on my laptop from where I am

    I am traveling with my macbook pro and I forgot to install final cut express and quicktime pro before I left. How can I in a way download them for free on my laptop from where I am? I need them and don't want naturally to buy them again!!!
    Thank you    

    Assuming you purchased QT Pro, you can always download it again at no extra charge by logging in to your Apple account.
    Regarding FCE, there is no way to download & install the product.  You need an original FCE install disk and your FCE serial number.
    Final Cut Pro X (aka FCPX) can be purchased & downloaded from the App Store.

  • I am trying to connect Garritan Personal Symphony to Logic Express and Garageband. A dialog box pops up and asks for plugin Garritan-P. Where do I find it and what do I do with it. I can't locate this plugin doing searches on any of the porgrams.

    I am trying to connect Garritan Personal Symphony to Logic Express and Garageband. A dialog box pops up and asks for plugin Garritan-P. Where do I find it and what do I do with it. I can't locate this plugin doing searches on any of the porgrams.

    I'm not sure which version of Garritan Personal Orchestra you have or when you are getting a window pop-up, but check this link for starters:
    http://afjohnston.blogspot.com/2009/11/using-garritan-personal-orchestra-gpo.htm l

  • I am trying to use macro express and adobe acrobat 9 profession keeps shutting down, why is this happening?  I tried to run as administrator already as well on both Macro Express and in Adobe and it still keeps shutting down.

    I am trying to use macro express and adobe acrobat 9 profession keeps shutting down, why is this happening?  I tried to run as administrator already as well on both Macro Express and in Adobe and it still keeps shutting down.

    same problem, it's been happening to me for a week or two now i'm thinking about backing up my documents and just wiping it completely, see if that works. Has anyone else tried this? I'm loosing time and have already lost a good few hours of work as it just crashes randomly. need help!!!
    - saving these threads on my favourites cause i'm about to crash . . .

  • HT202159 I downloaded Dragon Express and now it won't open.  It says it is INSTALLED but it won't open when clicked.  Tried to trash it and start over but won't let me trash because it says it is open.  But it isn't!  Called mac help and they can't help e

    I downloaded Dragon Express and think that it did not completely complete the download.  However, it says that it has been installed and my account has been charged 50.00.  However, when I click on the icon, it will not open.  I have tried everything from restarting, trashing the app, but it continues to tell me that I cna't trash the app because it is open.  I called apple support and they worked with me for about 30 minutes until they finally told me that the call had to end regardless of the fact that after all of their efforts, the problem was not resolved.  He gave me a link to get a refund and said it was easy to navigate however, it led me nowhere.  So now I am stuck with a worthless app, that does not work and a 50.00 bill to pay because I can't get support or link support to get a refund and even if I could get a refund I still have the Dragon express on my computer that does not work!!!  HELP!  I don't know how the app can be open when even support could not figure it out!  When I restart, the finder window opens where it never did before.

    Well first of all this is a public forum, so keep that in mind. The users here generally can not look up your case numbers.
    If AppleCare didn't work out for you, I believe your next step is
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html
    Unfortunately, their case indexing is on a different database, and they will not be able to look up your case number either. However, their support is free, and despite it may take a few bounces of emails back and forth, there is a decent chance they may be able to get a solution.
    Or... you can still try to shoot the **** with us here, which is Ok as well. But you'll have to keep in mind we can't look up your case numbers.
    By the way, the link for a refund, I think is for the same link I just gave you, so on second though, mabye it's best to just go there.

  • I am new to Final Cut Express and don't understand why I am unable to drag transitions into Canvas? Something wrong in my setup? It's not the overlays they are "on" so can anyone advise me please?

    I am new to Final Cut Express and don't understand why I am unable to drag transitions into Canvas? Something wrong in my setup? It's not the overlays they are "on" so can anyone advise me please, by the way the "L" doesn't appear in the bottom left hand corner either? and by the way how can I get rid of that irritating Blue badge saying "AutoFill your contact details" all mine are in "address book" already!

    You can't drag a transition into the canvas. If you're dragginmg a transition from the effects tab you drag it between the edit point of two clips in the timeline.
    Make sure show edit overlays is turned on in the Canvas view popup.

  • I have an airport express and want to know how to set up two different wireless networks. One with 5GHZ and one with 2.4GHZ so different devices can connect to either.

    I have an airport express and want to know how to set up two different wireless networks. One with 5GHZ and one with 2.4GHZ so different devices can connect to either. I have an iphone 4 that will not connect to 5ghz.
    thank you!

    Your AirPort Express is already providing two separate 2.4 GHz and 5 GHz bands, but each band is using the same wireless network name.
    This is the default setup for the AirPort Express, which is recommended for most users. The theory here is that devices will automatically connect to the best quality signal based on their capabilities and distance in relation to the AirPort Express.
    It is possible to assign a different name to the 5 GHz band, and then "point" devices at that network to connect. Some users swear by this option.....(I am not one of them).... but you might want to give it a try to see how it works for you.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the AirPort Express
    Click Edit in the smaller window that appears
    Click the Wireless tab at the top of the next window
    Click Wireless Options near the bottom of the next window
    Enter a check mark next to 5 GHz Name.....which will automatically add "5 GHz" to the network name....so you can identify it
    Click Save, then click Update and wait a full minute for the Express to restart
    Now you will need to "point" your 5 GHz capable devices at the 5 GHz network name.  2.4 GHz devices will connect to your "other" network name.

  • How To: Use Visual Studio, IIS Express, and Adobe Edge Inspect to view local projects

    You CAN view a Visual Studio project with Adobe Inspect. The work around takes a little bit of time.
    This involves using IIS Express to run your Visual Studio project, which is mainly a setting in Visual Studio, a Firewall change, a few command line and IIS Express config change.  It isn't actually all that bad, but will make your life A LOT easier.
    Here are the steps. (Note these are steps I used for Visual Studio 2012 and your project is part of a solution project.  Windows 7 or Windows 8)
    1. If IIS in not turned on, turn it on.How to: Enable Internet Information Services (IIS) - this should install IIS Express as well.
    2. In Visual Studio, find the port that Visual Studio will be using for your project by Running your web project (Debug), and note/write down/save the port number that shows up in the browser when the project launches. (ex.  http://localhost:12345)
    3. Add a NetShare Reservation (process for this will be different for Windows XP)
    Go to your Command Line (CMD) in Windows and in c:\Windows\system32> type in
    netsh http add urlacl url=http://yourIPaddress:yourPortNumber user=everyone
    (ex. netsh add urlacl url=http://12.34.56.78:12345 user=everyone)
    Hit Enter key. You should be a successful add reservation message
    3. Go to your Windows Explorer (File system) and go to c:/Users/YourName/MyDocuments (or Documents)/IISExpress/config/ and open 'applicationhost.config'
    In the 'applicationhost.config' file find your site in the <sites> section.
    Example:
    <sites>
    <site name="WebSite1" id="1" serverAutoStart="true">
                    <application path="/">
                        <virtualDirectory path="/" physicalPath="C:\MyProjects\TestSite" />
                    </application>
                    <bindings>
                        <binding protocol="http" bindingInformation=":12345:localhost" />
                    </bindings>
                </site>
    </sites>
    In this section ADD 2 new lines to the <bindings> section. Note add your own IP address and your own Computer Name
    <binding protocol="http" bindingInformation="*:12345:12.34.56.78" />
    <binding protocol="http" bindingInformation=":12345:MyComputerName" />
    Save the config file.
    4. Open up your Windows Firewall and go to 'Advanced Settings'. Here you want to create an Inbound Rule.
    Right click on Inbound Rule and select New Rule
    - Rule Type select 'Custom'
    - Program leave this
    - Protocol and Ports > Protocol Type select 'TCP' then Local Port select 'Specific Port' and fill in the port number you got from VS.  Leave Remote Port alone.
    - Scope
    There are a few ways of doing this. Typically you would go the the Remote IP address and select 'These IP addresses: and select ADD > select 'Predefined set of computers' and choose Local Subnet.  IF this does not work leave Remote IP addresses > Any IP address option selected instead.
    - Action leave this
    - Profile select Domain and Private
    - Name put IISExpressWeb for the name
    Select 'Finish'
    5. Go to Visual Studio. (Note if you have multiple projects in your solution, choose your start up project. Right click on your project in Solution Explorer in VS and select 'Set as Start Up Project' )
    Right click on your start up project again and you should see an option to 'Use IISExpress'
    In the DEBUG dropdown (from the main menu bar at the top) select 'YourProjectName Properties'. Mine was the last one in the list with a wrench icon next to it.
    This should open an new tab in your project, You should see a left hand list of option and a right hand column of options.
    In the left column select 'Web' and in this tab select Use Local IIS Web server and select 'Use IIS Express' and type in your IP Address and port number (same as before) in the Project Url text box.
    Save.
    NOW, you should be able to run your project in Visual Studio and use Adobe Edge Inspect on your device and view new results in Chrome. You can develop from there.
    If you still can not see it working, please be sure your device is on the same SubNet or Wireless network as your computer.  If you are in a large network but the domains can still see each other, the Firewall Setting detailed above to allow Any IP Address in your Scope section.

    Hi CMosqueda,
    Thank you for taking time to share this information with other users.
    Thanks,
    Preran

  • I have a linksys WRT54G router that we use as a base. I want to use Airplay using Airport Express and hook up my stereo to it. How can i set up my Airport express without a PC/laptop? I just downloaded Airport utility on my iphone and ipad,will that work?

    I have a linksys WRT54G router that we use as a base. I want to use Airplay using Airport Express and hook up my stereo to it. How can i set up my Airport express without a PC/laptop? I just downloaded Airport utility on my iphone and ipad,will that work? And one more thing about the setup, the linksys router shich acts as a base is in a different room as the airport express which i wanted to use for airplay. So I'm hoping to hook up the Airport express via wireless signal. If i can set it up, can someone pls help me out by posting detailed instructions. Thanks so much!

    The first message that AirPort Utility will display during the auto setup will be that the Express will be confgured to "extend" the network. When AirPort Utility analyzes the network further, and sees that the Express cannot "extend" the 3rd party network, the next message will indicate that the Express is being configured to "join" the wireless network.
    Once the Express is configured, if you later go into AirPort Utility to check the settings under the Wireless tab, you will see that the Wireless Mode is indeed "Join a wireless network".

  • Airport Express and BT Homehub - how can I get it to work?

    Hello, can someone help??
    I have an Airport Express and a MacBook. My only use for my Airport Express is purely to play ITunes music through my stereo via my MacBook wirelessly. Therefore I only require my Airport Express to join my current network.
    I recently changed my phone and broadband network provider from Talk Talk back to BT. My Airport Express worked fine when I was with Talk Talk, I was using a Belkin wireless router for my network connection which worked without any problems. When I got my Airport Express, it was easy to set up - it joined my Talk Talk network without a hitch.
    When my connection transferred to BT last week, I tried to connect up my Airport Express to my new BT Homehub. However when I went into Airport Utility my AX wasn't there. So, I read the guide on the Apple Support site and reset it to factory settings. This then seemed to make it 'appear' in Airport Utility, so I went through the process of setting it up as I did when I first bought it. When I got through to the final stage when it is 'Updated successfully and is now re-starting', the AX icon seems to disappear from the left hand side of the box and eventually I get an error message stating 'Airport Utility was unable to find your Apple wireless device after reinstating: The settings for this apple device have been successfully updated but there was a problem re-joining the wireless network or finding the apple wireless device. You may need to select your network from the airport menu and try again' (Incidentally, this last piece of advice doesn't work)... So, I am not sure what to do. I have tried changing the format of the WEP code I need to enter by adding " in front of the code as well as $ as is the suggestion on the Apple Support site...
    Is my AX faulty? Is my BT Homehub (The 'next generation of router' as BT call it) preventing my AX from joining my network?? If anyone can help I would appreciate it, I am not very clued up on these things.... :o)
    Thanks

    I have now managed to get AX working on my BT home hub. I took my second non-working unit back to Apple in Solihull and got them to test it in store. They agreed it wasn't working. They then tested another unit in store and that did work so I brought that home. It would be worth you doing the same as I got a 10% discount off my next purchase of anything at Apple for my troubles.
    I set my homehub security to None (from WEP - in homehub manager/advanced/wireless/security), plugged in my AX to homehub using an ethernet cable, then ran Airport utility and after a couple of runs it finally picked it up. I was able to set the configurations I wanted and 24 hours later it is still working. I set my homehub security settings back to WEP as soon as the AX was configured.
    I also installed airport utility on my son's windows laptop and that is now able to print wirelessly as well. So, finally a result.
    I would suggest you take your unit back to where you bought it from and get them to test it. If they offer you another one ask for a Mac genius
    to test it in store for you first. Also ask them to run through the installation procedure with you. Don't forget to ask for something for your troubles:)
    Hope that helps,

  • A Time Capsule, Airport Express and AT&T 2Wire walk into a bar...

    Alas, I'm sure this question has been asked before, but my reserach keeps turning up separate answers.  So I thought I'd turn to this forum for some advice.  Ultimately I'm seeks suggestions on various ways to configure my network to allow easy backups, connection two rooms, and wirelessly print from anywhere.
    I have a: 
    Time Capsule (dual band) - used for Time Machine backups
    Airport Express (older)
    and new 2Wire 3800HGV-B wireless modem/router from AT&T (for U-verse internet/TV)
    My room configuration is:
    Living room with TV, internet connected DVD player, and new AT&T 2Wire Wireless U-verse modem
    Home office with 2 desktop comptuers (no wireless cards) and a USB printer. 
    Two roaming laptops which move around the rest of the house
    The livingroom and the office can't be connected with a physical wire. 
    What I was hoping to do was setup my office with the Time Capsule in the office as a wired hub, and then use it as a wirelessly bridge to the 2Wire network.  But as I understand it, a Time Capsule can't be used as a bridge to a non-Apple product.  Please correct me if I'm wrong. 
    Alternately I could always get wireless cards for the desktop computers, but this leaves the printer.
    I've read suggesitons of people who have used their TC as the primary router, disabling wireless on their AT&T 2Wire, and hooking the two together with ethernet.  Others who just join the TC to the 2Wireness network.  But really what I'm seeking is a way to join the two rooms. 
    Any thoughts?  Am I asking the right questions or providing the right information?
    Much thanks,
    dana.

    So I figured I'd go with an initial suggestion and attached my TC via ethernet to the 2Wire modem/router in my living room, and make the TC my primary wireless router.
    Good plan
    since both will be in the same room, I assume I need to disable wireless on the 2Wire
    Correct
    What kind of configuration do I need to do on the TC, or do I just following the wizard and select 'Extend existing network'?
    You can follow the guided setup or I can give you a step by step manual setup. In either case, you will configure the TC to "Create a wireless network". 
    ("Extend" is only used if the TC connects using wireless only....you will be using Ethernet from one of the LAN <-> ports on the 2-Wire to the WAN port (world icon) on the TC.
    The guided setup will normally sense that the TC is connected to another router and suggest that the TC be configured in Bridge Mode, which is the correct setting. Otherwise, select the Bridge Mode option when it is presented.
    Note....If you have a newer dual band TC, the Guest Network option cannot be enabled when the TC is configured in Bridge Mode. So, if you want a "Guest" network, maybe the 2-Wire could provide that service.
    Should I attach this (via ethernet) to the TC or the 2Wire?
    Pick a LAN <-> port on either one, your choice, whichever is easier
    What should the AT&T DVR be connected to?
    I'm not familiar with an AT&T DVR, but if it connects via Ethernet, you can connect to a LAN <-> port on either the 2-Wire or the TC
    For printing, my plan is to attach the printer through USB to the Airport Express and then connect that wirelessly to the TC network (though my first attempt at this failed to connect).
    Suggest that you get the TC up and working smoothly. Then tackle the Express.

  • How can I know which clients are connected to my network through express and which are connected through extreme?

    I have an airport express extending, through wireless, a network provided by an airport extreme. How can I know which clients are connected to my network through express and which are connected through extreme?
    Here you can see both routers:
    I would expect to some clients connected to the express, other than the extreme. And that's all I see: only the airport extreme appears as client of the airport express.
    Below, one can see the summary of the config for both routers.
    Would somebody explain it?
    Thanks,
    Marcelo
    Message was edited by: Marcelão

    please disregard this answer.
    Message was edited by: Marcelão

  • My home network has an Airport Extreme w/Time Capsule as the base and then an Airport Express and a second Airport Extreme to reach different areas of the house.  Is there a way to use the second Airport Extreme for file storage on this network?

    My home network has an Airport Extreme w/Time Capsule as the base and then an Airport Express and a second Airport Extreme to reach different areas of the house.  Is there a way to use the second Airport Extreme for file storage on this network?  Network is administered through an iMac running OS X Yosemite 10.10.2.  Ideally, would like for the second Airport Extreme hard drive to appear on the list of devices in the Finder window.

    Ok.. gottcha
    The problem is network wise.. Yosemite is about equal to tin cans and string.. pathetic.
    Here is my usual set of instructions to get anything working on Yosemite.
    The best way to fix problems is a full factory reset of all the AE in the network.
    Factory reset universal
    Power off the AE.. ie pull the power cord or power off at the wall.. wait 10sec.. hold in the reset button.. be gentle.. power on again still holding in reset.. and keep holding it in for another 10sec. You may need some help as it is hard to both hold in reset and apply power. It will show success by rapidly blinking the front led. Release the reset.. and wait a couple of min for the AE to reset and come back with factory settings. If the front LED doesn’t blink rapidly you missed it and simply try again. The reset is fairly fragile in these.. press it so you feel it just click and no more.. I have seen people bend the lever or even break it. I use a toothpick as tool.
    Then redo the setup from the computer with Yosemite.
    1. Use very short names.. NOT APPLE RECOMMENDED names. No spaces and pure alphanumerics.
    eg AEgen5 and AEwifi for basestation and wireless respectively.
    Even better if the issue is more wireless use AE24ghz and AE5ghz with fixed channels as this also seems to help stop the nonsense.
    2. Use all passwords that also comply but can be a bit longer. ie 8-20 characters mixed case and numbers.. no non-alphanumerics.
    3. Ensure the AE always takes the same IP address.. this is not a problem for AE which is router.. it is a problem for AE which is bridged.. you will need to set static IP in the main router by dhcp reservations or use static IP in the AE which is tricky.
    4. Check your share name on the computer is not changing.. make sure it also complies with the above.. short no spaces and pure alphanumeric..
    5. Make sure IPv6 is set to link-local only in the computer. For example wireless open the network preferences, wireless and advanced / TCP/IP.. and fix the IPv6. to link-local only.
    6. Now mount the disk of the second AE in finder... manually.
    Use Go, Connect to Server and type in the AE ip address.
    SMB://10.0.1.2
    Where you will replace that address with the actual address. The network resource should be discovered and then it will request the password.. type that in and make sure you tick to save it in your keychain.
    There is a lot more jiggery pokery you can try but the above is a good start.. if you find it still unreliable.. don't be surprised.
    Do as much as you want of the above... not all of it is necessary.. only if you want it reliable.. or as reliable as Yosemite in its current incarnation can manage.
    The most important thing is point 6.. mount the disk using direct IP address and not names.. dns in Yosemite is fatally flawed.
    See http://arstechnica.com/apple/2015/01/why-dns-in-os-x-10-10-is-broken-and-what-yo u-can-do-to-fix-it/

  • HT4587 I was trying to change channels on my airport express and I hit "Forget" on the devices and now my computer can't locate the airport express device.  What do I do?

    My airport expresses are not showing up in my internet options.  I was trying to change channels between the airport utility and the airport expresses and they didn't reset properly.  I then hit "forget" on the options...now they are no longer visible.  It's a nightmare.  How do I get them back?

    There are three Airport resets, soft, hard and factory default.  It would probably be beneficial if you tried each one in sequence.  Actually, you could jump to the factory default reset if you don't mind reconfiguring from scratch.

Maybe you are looking for

  • N-Step Dynamic Workflow in SAP E-Sourcing _CLM2.0 with Adhoc apprver Featre

    Hi All, We are in process of implemeting SAP CLM 2.0 Application to one of our key client. one of the key Requirements is to implement n-step workflow approval based on the HR Based org structure. What the specific client requirement are as below ...

  • IPod touch 4g iOS 6 works with iTunes 10.6.3

    Is this unusual? I hooked my Touch 4G to my PowerPC iMac and opened iTunes to see what happens. Amazingly, it synced with the iMac. It was running iOS 6.1.3 but after I plugged it in, 6.1.5 was installed from the iMac. I always see people say it won'

  • Airport extreme will not boot with USB hard disk plugged in.

    Hi there, I'm using the Airport Extreme Base Station, and I find that if I have a USB hard disk plugged into it, it will not boot up, it only hang-ups with an amber light, and stays there indefinitely.  It's not a terrible issue because it can be ove

  • Fetch contents of infoobject in abap

    Hi Is it possible to fetch the contents of an infoobject from ABAP? The infoobject 0COSTCENTER contains the cost center hierarchy and I want to somehow access that hierarchy from ABAP. Is there a function module or a class to handle this? Regards, Ja

  • Problem with adding russian descriptions to profile and metadata

    when I try to add russian description (cyrylic) by copying from txt file russian letters into metadata (by manage metadata) i get only "?" sign instead off each russian letter. Have anyone problem like this? thanks for reply