Why do you need an f after a float initializtion?

When you make a declaration and initialization of a float, you have to put an f after the number, correct?
Like
float productPrice1 = 285.00f;
why do you need to do this and do you need to do it in an assignment operation to?
productPrice1 = 285.00f;
What about for doubles? Would I need to use a d in place of the f?
thanks

What about for doubles? Would I need to use a d inplace of the f?
No, you need to do that to tell the compiler it is a
float, not a double. When assign to a double, you
don't need to tell the compiler it is a double. :)although nothing bad will happen if you do use a 'd' or 'D'.
Good luck in learning Java.

Similar Messages

  • HT4889 This article should mention stuff you need to know after migration is done

    This article should mention stuff you need to know after migration is done, such as why MA makes "from old Mac" folders, for example
      XYZ (from old Mac)
    alongside the
      XYZ
    folder?
    And why after migration onto a clean system are there both of these:
      /Users/xyz/
      /Users/xyz 1/

    It might be helpful if you posted a link to the article.

  • Why do you need to shift click to select stroke color with eyedropper tool?

    Hi,
    Quick question..
    Why do you need to shift click to select the stroke color with the eyedropper tool?
    I had the problem where I could not do this earlier and found the solution on this forum.
    However I still do not understand the reason for this.
    Appreciate if anyone could explain it to me.
    Thanks in advance.
    Nori

    Hi, Nori,
    If you have the red and blue rectangle selected and the Fill square selected in the tool panel, as at bottom left, then hold the shift key down and click with the eyedropper on the green stroke in the upper rectangle, then the red fill will turn green but the stroke stays blue. If you select Stroke, as at bottom right, then shift-click with the eyedropper on the green stroke, the blue stroke will turn green but the fill stays red. With Fill selected and shift-click on the yellow fill, the red fill turns yellow; with Stroke selected the blue stroke turns yellow. If you do not depress the shift key, the red and blue rectangle will become yellow and green.
    It's complicated to explain, but I think that if you try it step by step it will make sense to you.
    Peter

  • Why do you need to go about linking to services-config.xml in your flex compiler

    Why do you need to go about linking to services-config.xml in
    your flex compiler when you want to do remoting. It just seems like
    a complicated way to do things.

    Yeah I find this perplexing as well. I'm guessing it has something to do with Opalis origins perhaps.
    Would be good to understand why.

  • Which two operattions do you need to perform after restoring---QNo.106

    In your database, all the tablespace are locally managed. You started RMAN using recovery catalog and restoring the contol file by using the following command:
    RMAN>RESTORE CONTROLFILE;
    which two operations do you need to perform after restoring the control file from backup?(choose two)
    A. shut down and restart the instance
    B. add new tempfiles to the temporary tablespaces after recovery
    C. perform a media recovery and open the database with the RESETLOGS option
    D. perform a media recovery and bring the database to NOARCHIVELOG mode

    This question is a little ambiguous.
    C is a correct answer when restoring a control file
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta051.htm#BGBJJGCB
    Restrictions and Usage Notes for RESTORE CONTROLFILE
    After you restore a backup control file, you must run RECOVER DATABASE and then open the database with the RESETLOGS option.
    B. If you were restoring a database from a backup you would need to create the temp files because temp files are not backed up.

  • Why would you need a database design before implementing?

    Why would you need a database design before implementing?

    977222 wrote:
    Why would you need a database design before implementing?It appears from the 4 questions you put up ina 2 hour period
    help me with this
    Why would you need a database design before implementing?
    Re: answer these quesions pls
    answer these quesions pls
    That you have put off doing your homework and now expect this forum of volunteers to do your research for you ....

  • HT1689 Why do you need my billing info if i have store credit trhough a redemed gift card?

    Why do you need my billing info if i have store credit trhough a redemed gift card?

    Welcome to the user to User Technical Support Forum provided by Apple.
    priscillamh25 wrote:
    Why do you need my billing info
    It is part of the Verification process.
    Do you have an issue supplying the requested Information.?
    If so... Contact iTunes Customer Service
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Why do you need cellular capabilities on the Ipad?

    Why do you need cellular capabilities on the Ipad?  Is this only necessary if you intend to use it as  a phone?  Is it necessary to have if you want to Skype?

    I normally like to buy from the Store. You can check it on the spot for defects.
    The following apps can open/edit/save MS Documents
    http://itunes.apple.com/sg/app/quickoffice-pro-hd-edit-office/id376212724?mt=8&l s=1
    http://itunes.apple.com/sg/app/office2-hd/id364361728?mt=8&ls=1
    http://itunes.apple.com/sg/app/documents-to-go-premium-office/id317107309?mt=8&l s=1
    http://itunes.apple.com/sg/app/polaris-office/id513188658?mt=8&ls=1

  • Why would you need an H.264 hardware encoding device?

    I am a casual user of Adobe Premiere Pro and just upgraded to CS5.5.   I have been reading threads and someone said that he has problems with the Matrox encoder.  I can import my video and make and DVD so why would you need another hardware solution? 

    I don't know how it works on Windows but on the Mac it shows up as a QuickTime component. So any application that can export a QuickTime movie (QuickTime Player, Adobe Media Encoder, Compressor, etc) can export to this component and it will utilize the Matrox hardware.
    Theoretically you could set your preview file format in Premiere to the Matrox component but I don't know how well it would work.

  • Why do you need PVDMs?

    Hi all,
    Dumb question!
    Why do you need PVDMs in a NM-HDV2-1T1/E1? The voice from the IP phones is in digital form, and so surely is the voice coming in over the T1/E1 - why do you need these DSPs?
    thanks,
    alec

    You could almost call them transcoders in this case.
    The default g711 codec for a given country (g711ulaw for North America, g711alaw for most everywhere else including I think the UK) is identical or nearly identical to that used on PRIs or clear-channel channelized circuits. If the g711 variant you're using for your VoIP traffic isn't the same as the g711 variant for PSTN circuit you're using, the DSPs handle that transcoding. If you're using robbed-bit channelized circuits, the DSPs have to drop a little bit of information. If you're using g729 or another low-speed codec, the DSPs have to "expand" the audio up to the PSTN channel size. And of course, the reverse of all this stuff takes place when audio comes in from the PSTN and has to be packetized and sent out on your IP network.
    The DSPs are also in charge of getting the right data to the PSTN channel at the right time. T1/E1 lines have strict timing requirements and the DSPs handle transmitting bits at just the right times. Part of that is handling the de-jitter buffers that turn possibly jittery RTP traffic into a nice isochronous bitstream for the PSTN circuit, and doing predictive insertion if we don't get voice data in time to put it on the circuit.
    One more duty the DSPs handle is echo cancellation from the PSTN. They "memorize" outgoing voice traffic, and then they listen for it coming back from the PSTN. If it's present, they mathematically "subtract" it from the incoming voice stream, which eliminates it.
    This is not a complete list of what the DSPs do for you, but I think I hit the highlights.

  • HT1918 Why do you need my credit card information when I purchase songs from an already purchased Itunes gift card?

    Why do you need my credit card information when I purchase songs from an already purchased Itunes gift card?  If I cannot purchase goods with the prepuchased gift cards, then the card is useless and I want my money back.

    We are fellow users here on these user-to-user forums, you're not talking to iTunes Support nor Apple.
    Just because you are being asked to enter your credit card details doesn't mean that it will be charged for your purchases.
    Is it a newly created account ? If it is then unless you use the instructions on this page when creating an account then credit card details will need to be entered before the account can be used in the store : http://support.apple.com/kb/HT2534

  • Why do you need to put credit card details in to the app store when you may want to simply obtain free items in the beginning?

    Apple clearly is a leader and thankfully are bringing fantastic products and initiatives to the market. 
    I certainly hope that the company doesn't get arrogant like it seems to do when forcing people trying to get free apps to put in credit card details. 
    I suspect it wouldn't be too much work to allow users to try it out first by using some free apps and when they are personally ready they can purchase to their little hearts desire.
    Poor showing from this perspecitive and easy to fix.

    Never put your credit card info into iTunes as Apple credit card security is horrible.  There are many cases of credit card problems with Apple. My credit card was compromised 2 weeks after creating an Apple account. That was the ONLY online usage of my credit card. 
    Apple does NOT follow PCI compliance which is the credit card industry standards for credit card data protection.  It requires all companies to NOT store credit card information online because (surprise, surprise Apple!) it can be hacked. 
    Why does Apple need to store the credit card data and put the information at risk and why do they not follow industry (PCI Compliance) guidelines - especially for free aps or updates?

  • Why do you need a logical plant?

    Hi Guys
    Please explain me with an example, Why do I need a logical plant in SAP. If i decide to have one, can I have a logical plant without a valuation and then on moving the stock to the original plant it should get valuated. I raise this discussion my implentation is affected because of wrong valuation of stock. Please express your confident views regarding.
    Regards
    Pradeep/ICF

    Hi,
    Not sure why you need a logical plant. Normally dummy plants are made to facilitate material movements to cater complex scenarios. In OMS2 you can omit any Material type with regards to the plant as "Value updating" .
    Regards
    Binoy

  • Why do you need my bank details if your apps are free

    Why can't I download a free app, if my bank has under £10 in it?

    I don't need your bank details, and neither does any of the other users in this user-to-user discussion forum. You will have to direct your question to Apple, not to other users.
    However, Apple needs some sort of proof you are who you say you are. The way they do this is by verifying a payment method. So you need either Apple gift cards deposited to your account, or a debit or credit card number.

  • Why do you need WiFi to watch a downloaded movie?

    I bought a movie on my Ipod touch and watched half of it. Then when I went to finish it, It would not come on due to "no Wifi connection". Why do I need WiFi connection to watch a movie I just downloaded?

    There's downloading and streaming. And often hard to tell the two apart.
    Downloading means that the files are stored on your device, streaming means that you simply access them, but need to be on the net to do so. It sounds like you were streaming a movie, not downloading one.

Maybe you are looking for

  • PDF Error

    Hi All, I am getting one error in Adobe forms... When I create a form and execute with out activation it is generating the PDF document ... when I do the same with activation it is giving system error....Can any  one suggest me how to overcome ..

  • Spry MenuBar/TabbedPanels/Accordion Javascript Not Working in IE8

    As you've heard, Adobe removed the links to the Spry API files (http://blogs.adobe.com/dreamweaver/2012/08/update-on-adobe-spry-framework-availability.htm l). My question is: If I link to a remote file, then my spry menu bar/accordion/etc. work in IE

  • Disabling LDAP sync

    Hi All I tried to disable LDAP sync and here are my issues 1 - I tried to put all the Boolean values in /db/ldapMetadata/EventHandlers.xml to "FALSE" but I ended that the user get "initiated status" although I am using autoapprover workflow. I expect

  • ALV Grid Control -- Field Catalog

    Hi ,   In the filed catalog for ALV grid control ( LVC_T_FCAT) ,there is a field called CHECKTABLE , can i use this to validate the value entered in that cell of a editable ALV. If yes then what are the perquisites of using it. Regards Arun

  • ORA-13282 on creating spatial index

    Hello I want to create a Spatial Index on a GeoRaster Table. First i updated the USER_GEOM_METADATA table: Insert Into MDSYS.USER_SDO_GEOM_METADATA Values ('LGVHH05', 'GEORASTER.SPATIALEXTENT', SDO_DIM_ARRAY(      SDO_DIM_ELEMENT('Rechtswert',3500000