I am alittle confused!

I was wondering do you think i could be having a probelm with import java.util.Scanner because of my version?
I am also having a problem with compiling with the import javax.JOptionPane
my issue is tha i have coppied two programs for betum out of a book, and one i worked on with my teacher in my Intro to Algorithm class and I was having problems when i compiled.
here is a sample of the code compiled
import javax.swing.JOptionPane;
public class ComputeLoan
public static void main(String[] args)
String annualInterestRateSring = JOptionPane.showInputDialog(
"Enter yearly interest rate, for example 8.25");
double monthlyInterestRate =
Double.parseDouble(annualInterestRateString);
double monthlyInterestRate = annualInterestRate / 1200;
String numberOfYearsString = JOptionPane.showInputDialog(
"Enter number of years as an integer, \nforexample 5:");
int numberOfYears = Integer.parseInt(numberOfYearsString);
String loanString = JOptionPane.showInputDialog(
"Enter loan amount, for example 120000.95");
double loanAmount = Double.parseDouble(loanString);
double monthlyPayment = loanAmount * monthlyInterestRate/ (1
- 1 /Math.pow(1 + monthlyInterestRate, numberOfYears * 12));
double totalPayment = monthlyPayment * numberOfYears * 12;
monthlyPayment = (int)(monthlyPayment * 100)/ 100.0;
totalPayment = (int)(totalPayment * 100)/ 100.0;
String output = "The monthly payment is" + monthlyPayment +
"\nThe total payment is" + totalPayment;
Joptionpane.showMessageDialog(null, output);
he told me to check what version of Java i had so i did and i discovered that i was using vs 1.4_2-12. What i am confused about, if this is the problem, is that off dowload page i downloaded the JDK 5.0 and installed it, so why is it version 1.4 and not version 1.5?
Any answer would be greatly appriciated.

Because in your path you're telling your computer to look for java 1.4 before it looks for java 1.5 Edit your path and it'll work.

Similar Messages

  • I'm alittle confused...

    My little sister has the 3 generation of the iPod touch and I tried going into my computer to fix it and now the itunes thing is telling me to enter my passcode before I connect it inot itunes? I am very confused! Will someone please take time to help me?

    If you can't remember or enter the passcode thane:
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Apple ID issues? i think i have two accounts but i cannot find out the password for the one that controols my apps!? please help!

    I think I have two apple ID accounts.
    The account I am using right now is Alexiaann22. Im like 99.9999% possitive that before this was my origonal account(rosepetttals).
    When I am buying an app in the app store the apple id is already there and all you have to do is change the password. But the apple ID thaat is there is the Rosepetttals.
    I am no longer using that email so I cannot get the password sent to it. I also cannot retrieve the password for rosepetttals because it says that the birthday I am entering is incorrect. but im pretty sure I would know my own birthday.
    I know its alittle confusing but I would appreciate any feedback. Thanks you! 

    I am having this same issue, please help asap... I cannot listen to half of my music library and have never encountered this issue before.

  • Ipod from pawn shop, wont register in itunes...does it work or not?

    I had an ipod (2nd gen) but it got wet. I have a bunch of songs in my itunes and just purchased a ipod (1st gen) from a pawn shop and want the songs from my itunes to be put on the new one. Im alittle confused about clearing the songs off the old. Also when I plug the new one in, It doesnt want to open itunes or have any response whatsoever on my computer. Please comment with any help.
    thx hidd

    Can/Does the iPod Shuffle still retain a charge?  In other words, when you remove it from the charger does it power on still?  If not, it's a likely sign that the battery is shot and in need of a replacment, especially considering the age of the device.
    B-rock

  • 2 different battery life readings?

    Im alittle confused here. im getting 2 different battery life readings.
    For instance, on the iphone(small battery on the top right of the screen) it shows
    around 40% charge left. When i connect it to my pc the big green bar shows up. but it shows that i have over 50% charge left. Why is this?

    The bar in the top right corner of the screen is just used mainly as an idea of how much is left. The green bar is larger, therefore can have more detail, so it can so a more accurate reading.
    HTH,
    Jenna

  • Quicktime symbol with a ? in the middle ???

    Hello, I am still new to apple. I notice when I am online, especially on myspace, that I cannot view videos anymore. Where friends songs on their page used to be is a quicktime symbol with a question mark in the middle of it and that same symbol where videos are loaded too. If I click on the link for videos I cannot view any of them either. I contacted apple support and they inform me that it is a site problem. It does not just happen on myspace though. It happened on the ebay home page where images were supposed to load. I tried reseting safari and ebays issues work but I still cannot hear peoples songs or see any videos on myspace that once worked on this Imac. Support informed me that I need a different player but as I told them it worked before? Does anyone have any ideas? I did download that DivX decoder. I deleted all the files I could find of it and it still does not work. This only happens on certain websites though. I can still watch all my movies in quicktime and movie trailers and such. So I don't know what is causing the website issues.

    csponge, I am having the same problems also w/ my Imac Intel duo-core. I'm a new Mac user also. alittle confused as to what you did. Did you remove ALL of the plug-ins from libary/internet plug-in folder or just the Flash plug in or the Quick time plugin. I have removed the flash plug-in several times and reinstalled it, and finally got the Flash player to work but I still Get the little cube w/ a ? in the middle, also I'll get a pop-up the says"Safari does not support the program need to view videos,(or something like that) would I like to try and open with window media player?" I try windows media and still nothing. The main web site I have trouble with is American Idol videos. Any Idea's ????
    iMac 1.83GHz Intel Core Duo   Mac OS X (10.4.4)  

  • Charging iphone with audio jack?

    I just purchased a new vehicle, and the auxillary connection for media is an audio jack input. Does anyone know where I can get an adapter for the cord that comes with the iphone? Or possibly a cord with the apple male connection on one side and a male audio jack on the other?
    Thanks!!

    I'm alittle confused, mainly with the title. Are you looking to charge the iPhone through the audio jack from the car? If so there is no power and no way to charge it from there. The AUX jack in the car is for audio in only.
    There are cables that have the iPod dock end to plug into the iPhone, and then it splits to audio and USB jack for charging. You could then plug the USB end into a cigarette USB power jack from the car and the audio cables could plug into the AUX jack on the car. I would suggest trying a Best Buy or Future shop.

  • Two computers, two iphones.....can we share one itune account?

    Sorry in advance if I sound alittle confused...
    I have an itunes account and have purchased a number of apps that my husband would like to sync to his new 3G phone using his computer.
    It would also be easier to have both our charges billed to the same credit card.
    We also have very different tastes in music so I would prefer not to mix libraries.
    How can we do this?
    (He downloaded itunes to his computer but I stopped him before he registered his phone)
    Thanks,
    Kathy

    Use the single iTunes account on both computers, and only download content on the computer you want that content to be on.
    (37308)

  • Cisco WCS 7.x TACACS+ with ACS 5.2

    Ok, so I took my bday off today so I could stay home and setup my lab for ie v2 and have the birthday wish of 'leave daddy alone for awhile' come true.  Here we are at 7:00pm and everything is flowing good including my blue moons and I decided to get tacacs working on an eval version of acs 5.2 per the ie list of lab equipment. frack me.  Instead of walking away and coming back later and going 'doh!', I'm going to whine instead....
    So I'm trying to get WCS to work with TACACS per this document:
    http://www.cisco.com/en/US/docs/wireless/wcs/7.0/configuration/guide/7_0admin.html#wp1191980
    However, after having to enter EVERY SINGLE TASK, once you get down to:
    Creating Service Selection Rules for TACACS
    To create service selection rules for TACACS, perform the following steps:
    Step 1 Choose Access Policies > Access Services > Service Selection Rules.
    Step 2 Click Create.
    Step 3 Select the protocol as TACACS and Service as Default Device Admin (see Figure 18-49).
    I'm alittle confused as to where it wants me to do click 'Create' at.  I of course did the 'hunt and peck' method and the only place I see where there is a 'create' buttong is under
    Access Policies >
    Access Services >
    Default Device Admin >
    Authorization
    but it's grayed out.  Someone wanna tell me what the crap.. and really, why 5.2 cisco.. why.

    Yeah, I've heard that, but in trying to stick with the IE list of used equipment/software I'm going for 5.2.  I've learned it's best to stick with the list so that you are not only familliar with that exact software, but that exact versions 'issues' as well.  No panic in the lab from ACS going NO NO NO, NOT IN MY HOUSE.

  • Clasification with Document Properties

    Hi,
    I´m stock in creating a Clasification for my Documents, I have added in the System Administration -> System Configuration -> Knowledge Management -> Configuration
    -> Content Management -> User Interface -> Search -> Search Options Set > UISearch > 'Allowed Sort Properties'
    the property Departamento as mandatory and indexable..... , and when I try to modify a document (i.e the description) then it sends this error message
    "Enter values for these mandatory properties: Departamento"
    But I can not see the property.
    I´m alittle confused on how to assign new properties to a Document and then with this properties Clasificate in Catgegories de Documents.
    Can some one guide me throug this process?
    Thanx in Advanced!
    Gerardo J

    Hi Gerardo,
    have you assigned your property to a property group and a property structure? Then you have to add you property structure to 'all_groups'. After that, you will be able to maintain a value for this property. Please have a look at this: http://help.sap.com/saphelp_nw04/helpdata/en/3d/51812c9ba14f4fa104fe3971d5507b/frameset.htm.
    After that, you can create a taxonomy. Explanations can be found here: http://help.sap.com/saphelp_nw04/helpdata/en/bf/a17a3cd15211d6b2c700508b6b8a93/frameset.htm
    Hope this helps
    Karin

  • How to generate 2 breakpoints on an encoder using the NI-7344 without physically connecting the encoder to a second axis?

    I'm using the NI-7344 motion-controller (for the control of 2 servo-motors) in combination with an E-series DAQ-card.
    I need to acquire data at two different scanrates using breakpoints over RTSI, one channel for example every 10 encoderpulses, the second channel for example every 200 encoderpulses.
    I'm using on onboard program that uses the modulo breakpoint for generating a pulsetrain over RTSI, but I also need a breakpoint (from an unused axis) to generate the other pulsetrain.
    Is there perhaps a way to tell an axis to use the encoder from another axis so the breakpoint can be generated at this axis without having to connect o
    ne encoder to two different axis?
    thanx

    Hello,
    I am alittle confused about your application, but maybe this will answer your questions. In the "Configure Breakpoint VI" you can set the Axis or Encoder input as the following: Axis or Encoder is the axis or encoder to be controlled. You can enable Breakpoint Position on encoders mapped to axes 1 through 6 or directly on encoders 0x21 through 0x24.
    So you can use an encoder that is not mapped to that axis.
    Please let me know if this was not your question.
    Regards,
    Andy Bell
    Applications Engineer
    National Instruments

  • OCF or Javacard.Framework

    OCF or Javacard.Framework? which one is better? I'm alittle confused with these concepts..
    as I told in my last post my pc application is written in Delphi language and I installed my applet into card which delphi app send data to this applet via APDU..
    now the question is Which one could be better to use in my applet? OCF or Javacard.Framework??
    regards

    From my understanding OCF is an off-card API for communicating with cards and readers with Java. The card you have should have the org.globalplatform package and won't have OCF. If you want your applet to be portable across different cards, you should probably stick with javacard.framework.
    JCOP Tools should also help with this. It will only allow you to build against standard libraries. If you have vendor specific libraries for the target card you are using, you will need to get the Jar files to build against from them.
    Cheers,
    Shane

  • Creating a Ipad/Iphone app

    Hello,
    i am looking to create an ipad interactive story app. Nothing fancy. I am alittle confused on what adobe programs/workflow to use.
    Can someone give me some suggestions?
    TYIA

    The way I've solved the same issue is to have a 480x320 stage, but with content that goes from -20 to + 340, giving overall content of 480x360. That then exactly fills the regular iPhone, and Retina display, and on the iPad you see the extra content. I made sure important buttons and such were not right at the edges, so they sohwed up fine for both aspect ratios screens.
    You could do a similar trick with sizes of 960x640, with content above and below the stage, to give a total of 960x720.
    Another part of the trick was to make symbols be at a scaled amount, so that the native size for the symbols was suited to the iPad. That meant things were scaled to 46.875% on the iPhone stage, and would grow to 100% on the iPad.

  • Pci 6601 for decoding renishaw and new encoder

    i have a pci 6601 and scb 68 that was recommend for decoding a renishaw encoder.
    it works great for determing the position of the renishaw.
    the renishaw encoder type is
    rgh24x30a00a
    http://www.renishaw.com/en/rgh24-linear-encoder-system--6444
    i would like to try the pci 6601 on a similar encoder.
    With this new encoder, im not seeing any output from the pci 6601. 
    I can see the pulses on the oscilloscope so im alittle confused.
    The pulses appear center around 2.5 volts and are around 1v in amplitude.
    In the same manner as with the renishaw, B- goes to counter 0 aux, a- to 0 source, and grond to ground.
    I believe the particular renishaw has a 1v peak to peak sinusoid pair (sin / cos).
    The new servo has a build in encoder with one volt peak to peak sinsuoid centered at 2.5v.
    Any ideas on why no counter number is showing?
    Message Edited by jimmyinct3 on 11-14-2009 05:57 PM

    If the signal is centered around 2.5V as mentioned, then it sounds like you will have difficulty meeting the TTL thresholds for hi/low. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground termina...  Scope both encoders and compare the signals that you are seeing on both.  What are the differences?
    Regards,
    h_baker
    National Instruments
    Applications Engineer
    Digital Multimeter Resources

  • Setup snapshot for disconnected computing

    Hi,
    I'm looking for some advice/knowledge.
    I'm looking at converting a microsoft access system to oracle database.
    Much of the application needs to be run from many laptops Win OS's versions 98 to XP
    that will not have online access to the database (no network or web access).
    We are currently using oracle 8.1.7.3 running on sun solaris
    tools: developer 6.0 for client-server
    and only recently starting web app's with jdev1.3 using oracle 9ias application server.
    The entire application will have to run on the laptops with updatable rights to all (master) database tables.
    The laptop users need to connect to master database, retreive master database to laptop (local) or refresh local laptop database from master
    run application connected to local laptop database
    then refresh master database from local database.
    I'm looking for advice on setting up database master and local what should be installed on laptop.
    Oracle lite or personal oracle 8i.
    Any suggestions?
    Thank you
    David

    Thanks Olaf
    I meet with our Tech Support
    They want to install the full oracle 8.1.7.4 database on the laptops
    inconjuction with OC4J.
    There will be 1 master application schema in our main production database.
    An each laptop will have to have it's own database with snapshots from the main schema.
    Now I need to learn how to implement this??
    I see alot of documentation that is alittle confusing mostly relating to multi-master configuration
    which i do not think we need or want or setting up replication for olite.
    Does oracle have any demos or point me to good/relivant documentation for setting up replication
    Specifically for my senario 1 master schema in existing database, partial replication of that schema onto laptops
    Thank you
    David

Maybe you are looking for