Can someone tell what I have done wrong here trying to pass strings to a

I have just started programming in java I can't see what I have done wrong here in my code can someone please help me?
// Thomas Klooz
// October 10, 2008
/** A class that enters
* DVD Info pass the arrays
* DvdInventory Class and then manipulates the data from there*/
import java.util.Scanner;// imports a scanner for use by the class
public class DVDInfo
public static void main(String args[])
String theTitle[] = new String[10];// array of titles
int inventory [] = new int[10];// array of ten for inventory
int quantity []= new int[10];// array of ten for quantity
double price []= new double[10];// array for the price of each double
int count = 0;// variable to track what information is suppose to be passed to class
System.out.println(" Welcome to DVD Inventory Program!");//Welcome message for the user
System.out.println();//returns a blank line
boolean stop = false;// boolean charcter to make program stop
while(! stop)
Scanner input = new Scanner( System.in );// creates scanner to use
System.out.println(" Enter an item name or stop to Quit: ");// prompt user for input
theTitle[count] = input.nextLine();// assigns the value to Title
if (theTitle[count].equals("stop"))
System.out.println();//returns a blank line
System.out.println(" The DVD Inventory has been entered!");// diplay exit message to
stop = true;
} // end if
else // continue to get data
System.out.println();//returns a blank line
System.out.println(" Enter the item number must be greater equal or greater than zero: ");// prompt user for input
inventory[count] = input.nextInt();// assigns value to inventory
if (inventory[count] < 0)// continue until proper value has been entered
System.out.println( " Error no numbers can be below zero!");
System.out.println(" Enter the item number must be greater equal or greater than zero: ");// prompt user for input
inventory[count] = input.nextInt();// assigns value to inventory
}// end if
System.out.println();//returns a blank line
System.out.println(" Enter the amount of DVDs you have must be greater than zero: ");// prompt user for input
quantity[count]= input.nextInt();// assigns value to inventory
if( quantity[count] <= 0)// continue to proper data is entered
System.out.println( " Error: you have no inventory for this item ");// error message sent to user
System.out.println(" Enter the amount of DVDs you have must be greater than zero: ");// prompt user for input
quantity[count]= input.nextInt();// assigns value to inventory
}//end if
System.out.println();//returns a blank line
System.out.println( " Enter the cost per DVD: ");// prompt user for input
price[count] = input.nextDouble();// assigns the value to price
count++;//increaments count 1
}// end else
}// end while
DVDInventory myDVDInventory = new DVDInventory(theTitle,inventory,quantity,price,count); the problem seems to be here because this is where I get error message when I'm trying to pass to class named DVD
}// end main
}// end class

this is the code that is important
import java.util.Scanner;// imports a scanner for use by the class
public class DVDInfo
public static void main(String args[])
String theTitle[] = new String[10];// array of titles
int inventory [] = new int[10];// array of ten for inventory
int quantity []= new int[10];// array of ten for quantity
double price []= new double[10];// array for the price of each double
int count = 0;// variable to track what information is suppose to be passed to class
System.out.println(" Welcome to DVD Inventory Program!");//Welcome message for the user
System.out.println();//returns a blank line
boolean stop = false;// boolean charcter to make program stop
while(! stop)
Scanner input = new Scanner( System.in );// creates scanner to use
System.out.println(" Enter an item name or stop to Quit: ");// prompt user for input
theTitle[count] = input.nextLine();// assigns the value to Title
if (theTitle[count].equals("stop"))
System.out.println();//returns a blank line
System.out.println(" The DVD Inventory has been entered!");// diplay exit message to
stop = true;
} // end if
else // continue to get data
System.out.println();//returns a blank line
System.out.println(" Enter the item number must be greater equal or greater than zero: ");// prompt user for input
inventory[count] = input.nextInt();// assigns value to inventory
if (inventory[count] < 0)// continue until proper value has been entered
System.out.println( " Error no numbers can be below zero!");
System.out.println(" Enter the item number must be greater equal or greater than zero: ");// prompt user for input
inventory[count] = input.nextInt();// assigns value to inventory
}// end if
System.out.println();//returns a blank line
System.out.println(" Enter the amount of DVDs you have must be greater than zero: ");// prompt user for input
quantity[count]= input.nextInt();// assigns value to inventory
if( quantity[count] <= 0)// continue to proper data is entered
System.out.println( " Error: you have no inventory for this item ");// error message sent to user
System.out.println(" Enter the amount of DVDs you have must be greater than zero: ");// prompt user for input
quantity[count]= input.nextInt();// assigns value to inventory
}//end if
System.out.println();//returns a blank line
System.out.println( " Enter the cost per DVD: ");// prompt user for input
price[count] = input.nextDouble();// assigns the value to price
count++;//increaments count 1
}// end else
}// end while
DVDInventory myDVDInventory = new DVDInventory(theTitle,inventory,quantity,price,count);
}// end main
}// end class The problem seems to be when I try to pass all the variables to the class DVDInventory the first statement after all. I get message that say can't find java. String
Edited by: beatlefla on Oct 10, 2008 8:20 PM

Similar Messages

  • Can someone overlook what i have done? (in premiere pro 2.0)

    Since my topic doesnt seem to have been moved or i can't find it here another try:
    Hey there adobe community!
    Im a newbie to adobe premiere and also to this forum, i'll be honest and have to say i just started video editing with this project for my mum (she's a piano teacher and they filmed a concert with all her pupils with 2 different cameras).
    I did my best to make some decent cuts out of this mostly not really good material and im OK with the result i got, but the problem is that when i try to export the final version i get the all so well known "Error compiling movie - unknown error" error. :S
    Now i have read that this may be caused by different file formats (i had to convert the files from both cameras in the first place (which was a hell of work for someoen having no clue about video file formats lol) to get premiere accept them. Now i'm pretty sure there are at least 2 different file formats in the same sequence, but they are all mixed together (due to cuts) and thats why i am not really willing to export every single one of them and put them all together again, that's just so much work and i don't know if the error won't occur afterwards...
    What i am trying to ask is: Could someone of you that is a bit more experienced give my project a quick look? I know we are all busy but my time is running out since that movie should have been finished a while ago, so i'm a bit desperate at the moment.
    Thx for reading and in hope of an answer,
    Sicro
    I will copy paste from my other topic:
    I have enough Space on my hard drive (~40 GB) RAM is 4GB i got a quad core processor each 1,25 GHz and the original file format of the files is (yet) unknown to me, i will try to look it up once i get to my other PC where i converted the files.
    Yes i tested the original files, they seemed to work, I converted the files into several *.wmv and one *.MPG.
    http://www.pic-upload.de/view-21309687/Sequence.jpg.html  Sequence
    http://www.pic-upload.de/view-21309690/Export_Settings.jpg.html Export Settings
    In addition the file:
    This is the entire file exported via project manager (about 1,1 GB):
    So, i hope this is working for you now: https://drive.google.com/file/d/0B9pHH5tx-dUOckZlSlloazhpTDg/edit?usp= sharing
    Note: The quality of the standing still camera is that low, because of it being a very old one. ^^

    The problem is you are trying to edit wmv (which you have converted from what?) What camera did you use?
    wmv and mpg are not a good format to edit.
    What is the final destination of your movie?
    Export settings which you are showing are not ideal.
    I think E12 would be a better solution. You cannot import the PP2 projec into E12 only the clips.

  • Every page in website is different even though they are the same size!  4 Views 0 Replies Latest reply: Sep 25, 2011 4:23 PM by kellynewmac     kellynewmac Level 1 (0 points) Sep 25, 2011 4:23 PM Can someone please tell me what I have done wrong ?

    Can someone please tell me what I have done wrong>?  Obviously I am new to iweb, and need help.  I recently built a website in iweb with only 5 pages, and I made the height, width, & all of the specs regarding the page size exactly the same, but they all load as different sizes on the website.  Also the text i typed loads right away, and the images take forever to load with each page when i look at it on a pc, and not mac.  Can someone please help me!!

    Obviously I am new to iweb, and need help.
    And one of your Services is Webdesign?
    Small consolation : iWeb is a very advanced piece of software. So advanced that even highly skilled professionals have difficulty understanding and using it.
    Anyway, your pages are NOT the same size by design. Which can clearly be seen. But also by checking the source of the pages.
    The Home page is 665px wide and the Contact page is 820px wide. That doesn't happen by magic. It's user induced.
    So do what I do : pay attention to every tiny detail. Especially when it's your business. No excuse.
    Here are some sample Sites :
         http://www.wyodor.net/mfi/
    You can download Domain files for your pleasure to study and use here :
         http://www.wyodor.net/mfi/Maaskant/How_To.html
         http://www.wyodor.net/mfi/size/768-946.html

  • I have a problem with iphoto (have a mac book pro): the icon in the dock appears with a question mark, and the application is gone!!! Can someone tell what's going on? Yesterday I had the same problem with itunes

    I have a problem with iphoto (have a mac book pro): the icon in the dock appears with a question mark, and the application is gone!!! Can someone tell what's going on? Yesterday I had the same problem with itunes: I downloaded the last version (it's free), but I cannot do the same with iphoto, and more important: I need to know what is happening!!! Please help me!

    Applications should not disappear all by themselves.
    If they are then that coud indicate serious problems with your hard drive.
    Backup everything up as quickly as possible.
    Using Disk Utility verify your system disk.
    Allan

  • I had to change my password on my email password, but went to my setting under mail accounts and it is grey and I am unable to update it there.  Can someone tell what I can do? This on an iPad2.

    I had to change my password on my email password, but went to my setting under mail accounts and it is grey and I am unable to update it there.  Can someone tell what I can do? This on an iPad2.

    Duffygibbs wrote:
    I did go to settings, restrictions....and there was a list of things...but no "off" or "on" to change. 
    If the word "Off" is sort of cloudy and the settings are greyed out - that means you do not have restrictions enabled - but just in case - do you use a passcode to lock the iPad?
    Exactly what message are you getting and where are you getting the message - what does the "email icon" mean?

  • How can I tell what songs have been purchased?

    So, I've been going through some guilt and have been replacing copied songs with Apple Store purchases. However, some songs I am clueless about. Is there a way to tell what songs have NOT been purchases through the Apple Store (or, Amazon, for that matter)?

    If you mean to check if one of your songs hasn't been purchesed by you yet, then one way to do it is going to iTunes and then to the iTunes Store. Once there, in iTunes 11.2.2, there is a column to the left labled QUICK LINKS. From there there are four imediate options: Account, Redeem, Purchased, and Support. If you click on purchesed, it will show you the songs you have bought from apple. Once you have clicked purched, there is also an option on the top right hand corner to show all of your purcheses or just the ones that are not on your mac.
    Hope this is what you were looking for.

  • Pls can someone tell me why I don't have the option to update my software to iOS 7 on my iPad . No update software in general setting.?

    Please can someone help me download ios7 to my iPad when I don't have a software option in my general setting.?

    That started in iOS 5, if you don't have that, you will need to update through iTunes on your computer.

  • What i have done wrong: I got the information "no bootable device insert boot disk and press any key

    I use yesterday bootcamp to instal windows 7 at my mac. After i had start bootcamp, i instaled windows, particion my hard driver, and restart my computer. After i had restarted my computer, i got a black screan with the information: no bootable device insert boot disk and press any key.
    To press any key was not possible, to get out my cd of the drive is not possible. Can you tell me what happen?
    Thanks

    No I don´t use Fusion Drive. And yes i have read guide to use bootcamp.
    I use only the bootcamp to create the particion.
    Steps:
    1. Start Bootcamp
    2. Create a particion and updates the drivers for windows at mac
    3. divide the hard drive in 150 gb for mac and 100 for windows
    4. particition is created
    5. Put the Windows 7 OEM in the driver
    5. restart the mac
    6. after restart the mac i got the information:
    no bootable device insert boot disk and press any key
    to press any key was not possible. Only black screan
    The support told me it is no possible to use Windows 7 OEM at a mac, but i have seen video, where people use windows 7 OEM and the guy in the shops say this is possible.
    What was is wrong?
    Is OEM possible or not?

  • Streaming, can someone explain what I am doing wrong?

    I have two ATVs both synced to one computer. I have a large music library on a second computer but can't find how to stream to one of the ATVs.
    I followed the instructions in the booklet, opened iTunes on the relevant computer, chose sources on the ATV, "Connect to New iTunes" and noted the passcode, selected the ATV icon and "Click to set up", entered the passcode and the ATV icon disappeared. "My Library" shows in the sources but the ATV icon only re-appears on the computer if I switch to "Connect to New iTunes". If I then click on the icon the ATV page opens up with details of the ATV and a message saying that the ATV icon will only appear when "My Library" is selected on the ATV, but as soon as I do that the ATV icon disappears. The help file says in System Preferences sharing pane make sure "iTunes Music Sharing" is on! There is no "iTunes Music Sharing"!!
    Please, can someone take this idiot through the process step by step, including how you start streaming once you have successfully made the connection?

    Glad to see everything is starting to work out.
    You might consider two user accounts (that's logins) with a music library in each. It's a little more work to operate, but probably less than having two libraries in one user account and providing both users are logged in and have itunes running you should get both libraries available to you at the same time on the tv (obviously you would need to switch between them on the tv).
    Otherwise I'd consolidate them by opening itunes (with library 1) and then dragging and dropping the music files from the music folder of library 2 onto itunes, I'd start by doing a few tunes to satisfy yourself that all is OK, you can probably do them in large chunks but I'd probably not drag them all at once, if something did go wrong you probably wouldn't lose any files but it might be difficult to figure out what files had been added and which hadn't before the problem occurred.

  • Can someone explain what I am doing wrong? Windows Boot manager error.

    Okay, I've literally searched EVERYWHERE and can not find a reasonable answer to this question.
    Everytime I try to load windows on bootcamp, I get this error:
    Windows failed to start. A recent hardware or software change might be the cause . to fix problem:
    1. insert windows installation disc and restart computer
    2.choose your language settings, and then click "next"
    if you do not have the disc, contact your system admistrator or computer manufacturer for assistence
    status 0xc0000017
    And that's it.
    I have tried everything from usb to countless 8 gig DVD which I wasted from burning the ISO time and time again.
    I am doing everything through the bootcamp installer and I partition up to 80 gigs of space of my hard drive for it.
    This is an official iso image from windows btw.
    I think it's a memory problem, but I am not sure. Here are my specs:
    Model Name:          Mac Pro
      Model Identifier:          MacPro5,1
      Processor Name:          Quad-Core Intel Xeon
      Processor Speed:          2.8 GHz
      Number of Processors:          1
      Total Number of Cores:          4
      L2 Cache (per Core):          256 KB
      L3 Cache:          8 MB
      Memory:          3 GB
      Processor Interconnect Speed:          4.8 GT/s
      Boot ROM Version:          MP51.007F.B01
      SMC Version (system):          1.39f11
      SMC Version (processor tray):          1.39f11
    If you can shoot me some advice on what I may be doing wrong, please do. I really need it urgently.
    Thanks!

    you really are way too low on memory, but that is not the issue.
    all the other hard drives need to be pulled except one.
    bumbing is sort of like there are only so many people likely to read and try to help. give us a couple hours or more.
    you say Windows, I ask "which?"
    And really all the faq and how to and even guide should cover your bases.
    Can only guess that the media you used to burn DVD or source..  see, we are not mind readers, some buy System Builder, or buy as a ISO download and burn to DVD... so start with the FAQs.
    Mac 101: Using Windows on your Mac via Boot Camp
    https://support.apple.com/kb/HT1461
    http://www.apple.com/support/bootcamp/
    Helpful Apple Support Resources (Forum Overview)
    Boot Camp Support 
    Boot Camp Manuals
    For Windows 7: http://windows.microsoft.com/systemrequirements
    For Windows 8: http://windows.microsoft.com/en-US/windows-8/system-requirements
    Learn more about how Mac computers can run Windows 8 using Boot Camp 5.
    http://support.apple.com/kb/HT5628
    Products Affected
    Boot Camp, Windows 8
    General installation questions
    What is Boot Camp 5?
    Boot Camp 5 is not a release of OS X software. Rather, it is a release of the Windows Support Software (drivers). You will need to use this software on your Mac with Windows 8 or Windows 7. For more information on Boot Camp 5, see thttp://support.apple.com/kb/HT5639
    Which Macs support Windows 8?
    MacBook Air (Mid 2011 or newer)
    MacBook Pro (Mid 2010 or newer)
    Mac Pro (Early 2009 or newer)
    Mac Mini (Mid 2011 or newer)
    iMac (27-inch, Mid 2010 or Mid 2011 or newer)
      For more information, see this article.  What are the System Requirements for Windows 8?
    Please see this article.
    How can I install Windows 8 on an eligible computer?
    Use the Boot Camp Assistant. The assistant will partition your internal hard drives and install Windows 8. For more information on Windows 8 installation, see the Boot Camp Installation & Setup Guide.
    Can I use an upgrade from Windows 7 to Windows 8?
    Yes. Download and install the Boot Camp 5 Support Software before attemping the upgrade by using the Boot Camp Assistant in OS X Mountain Lion v10.8.3. Alternatively, you can manually download the Boot Camp 5 Windows Support Software here.
    When I do an upgrade install from Windows 7 to Windows 8, an "Uninstall USB 3.0 eXtensible Host Controller Driver" message appears. What do I do?
    Do not click on Uninstall. Click the back button and Cancel the upgrade. Download the Boot Camp 5 Support Software by using the Boot Camp Assistant in OS X Mountain Lion v10.8.3, or click here to download them. Then, try the upgrade again. See this article for more information.
    After upgrading from Windows 7 to Windows 8, Thunderbolt devices are (not) being recognized when I connect in. How do I fix this?
    Disable the Windows 8 Fast Boot feature to allow Thunderbolt devices to be recognized. See Boot Camp: Thunderbolt devices not recognized after Windows 8 upgrade for instructions.
    Is there an OS X version requirement to use the Boot Camp Assistant to download Boot Camp 5 Support Software?
    You need OS X Mountain Lion v10.8.3 or later installed to download the Boot Camp 5 Support Software (Windows drivers) using the Boot Camp Assistant. After upgrading, click the Go menu and choose Utilities. Then, open Boot Camp Assistant and follow the onscreen instructions. You can download the Boot Camp Installation & Setup Guide.
    Is there a download of the Boot Camp 5 Support Software if I'm not using OS X Mountain Lion v10.8.3?
    Yes, you can download the Boot Camp 5 Support Software here.
    http://support.apple.com/kb/DL1638
    How do I use the Boot Camp 5 Support Software I downloaded from the web page?
    The download file is a .zip file. Double click it to uncompress it.
    Double-click the Boot Camp disk image.
    Copy the Boot Camp and "$WinPEDriver$" folders to the root level of a USB flash drive or hard drive that is formatted with the FAT file system (see question below for steps on how to format).
    Install Windows, leaving the flash or hard drive attached to the USB port of your Mac.
    Installation of the drivers can take a few minutes. Don't interrupt the installation process. A completion dialog box will appear when everything is installed. Click Finish when the dialog appears.
    When your system restarts your Windows 8 installation is done.
      Note: If the flash drive or hard drive was not attached when you installed Windows and was inserted after restarting into Windows 8, double-click the Boot Camp folder, then locate and double click the "setup.exe" file to start the installation of the Boot Camp 5 Support Software.  How do I format USB media to the FAT file system?
    Use Disk Utility to format a disk to use with a Windows computer. Here's how:
    Important: Formatting a disk erases all the files on it. Copy any files you want to save to another disk before formatting the disk.
    Open Disk Utility.
    Select the disk you want to format for use with Windows computers.
    Click Erase, and choose one of the following from the Format pop-up menu:
    If the size of the disk is 32 GB or less, choose MS-DOS (FAT).
    If the size of the disk is over 32 GB, choose ExFAT.
    Type a name for the disk. The maximum length is 11 characters.
    Click the Erase button and then click Erase again.
    Which versions of Windows are supported with Boot Camp 5?
    64-bit versions of Windows 8 and Windows 7 are supported using the Boot Camp 5 Support Software. If you need to use a 32-bit version, you need to use Boot Camp 4 Support Software, and you must use Windows 7. 32-bit versions of Windows 8 are not supported via Boot Camp. For a complete list of Windows OS support,

  • From ARD Client, how can I tell what has been done on my machine?

    I am in a workgroup that is managed by ARD. I am not an administrator, but I'd like to get an idea of what has been done on my machine by the admin through ARD. It doesn't have to be too specific or real-time, but I'd like to get some idea. For instance, were there reports run on my application usage? Was there software installed? I'm really just fascinated by automation and software used to increase efficiency. I was thinking there would be a way to monitor incoming and outgoing requests or something, but that might not be the answer in this case. So how can I figure out what ARD admin is doing on my machine?

    To answer what was asked in the subject of your question... ARD Client will not tell you anything. It is just the doorway.
    There may be logs, but those would not be accessible from a non-admin account.

  • What am I doing wrong here trying to deploy forms?

    I am trying to deploy forms for the first time, but it's not
    working. I would love to hear anyone's advice on what I am
    doing wrong. Here are the steps that I did to try to get them
    deployed using OAS 4.0.7.1.0 and Developer 6 Server. Please let
    me know if I missed steps or have unecessary ones.
    1) created Forms listener in OAS Manager with port 5555. (is
    this unecessary)
    2) created forms web cartridge with virtual path = webcart
    3) configured the cartridge configuration code =
    oracle.forms.engine.Main , codebase=forms60code, baseHTML = c:
    \orant\webhtml\forms60cart.htm, HTMLdelimiter=%
    4) created forms service by typing ifsrv60 -install...but I
    think this is unecessary b/c I could just click the
    START...PROGRAMS...Developer 6...forms server listener
    5) changed the cartrid.htm template file. i changed the default
    file called forms60cart.htm >> I changed these
    codebase=forms60code ,code=oracle.forms.engine.Main,
    serverport=5555, serverArgs module=emp.fmb (which template ones
    should I be modifying)
    6) put this new htm file into my orant/webhtml directory
    7) I get the requested url was not found when I call up
    http://machine.domain:5555/webcart/forms60cart.htm (is this the
    form listner port 5555, or should it be the one that is
    generated from opening forms server listener from the start
    menu. is that the default port 80?
    thanks for any response back
    null

    Hi. I have experienced developer server.
    : 1) created Forms listener in OAS Manager with port 5555. (is
    : this unecessary)
    -> 5555 is a port for web listener(httpd).
    you can use any existing listener.
    : 4) created forms service by typing ifsrv60 -install...but I
    : think this is unecessary b/c I could just click the
    : START...PROGRAMS...Developer 6...forms server listener
    -> in this case, forms server uses port 9000 by default.
    and oas indicates 9000 as default forms listener port,
    if there is no specification. you can use 9001,9002...
    I recommend to specify this in your html file
    as serverport.
    : 5) changed the cartrid.htm template file. i changed the
    default
    : file called forms60cart.htm >> I changed these
    : codebase=forms60code ,code=oracle.forms.engine.Main,
    : serverport=5555, serverArgs module=emp.fmb (which template ones
    : should I be modifying)
    -> serverport shoud not be 5555. 9000 by default.
    and I think module=emp.fmx is right.
    and now call http://machine.domain:5555/webcart/forms60cart.htm
    good luck.
    null

  • How can you tell what users have which reports open in Infoview

    Hi!
    In Crystal Server XI, is there any way that you can see what reports are currently being viewed in Infoview and by what user?  Or a history of how many times a report has been viewed so that I can tell which reports are not used that often and maybe adjust the schedule or get rid of them. 
    Thanks,
    Cyndi

    Cyndi,
    The method to track the information you are seeking is called Auditor.  Auditor is either installed at server software initialization or the install can be performed after you're deployed by re-installing the software and choosing only the Auditor piece.  It is best to study the guide (xir2_bip_auditor_en.pdf) prior to launching out on this endeavor.
    Thanks,
    John

  • TS3989 I can't see my photo stream at my icloud, can someone tell what to do

    I update my iphone to IOS6 and activate my icloud. When I visit icloud it does not appear photo stream. The iphone has ON to automatically sinc photo stream. Same problem with whatsup photos, it doesnt appear at photo stream nor photo album

    iCloud.com does not have Photo Stream.
    Hope you find the links below are helpful to you.
    iCloud: Photo Stream
    iCloud: What is Photo Stream
    iCloud: Add photos to Photo Stream manually

  • Unknown video board - can I tell what I have? [SOLVED]

    I have a laptop with an unknown video board.  The sticker on the machine simply says, "nvidia quadro."  The nvidia-173xx package doesn't seem to work; when I enter X my screen goes block and keyboard/mouse lock up.  Is there something akin to 'cat /proc/cpu' for a GPU?
    Thanks!
    Last edited by graysky (2009-09-13 17:00:20)

    Nice, thanks!
    EDIT: I just found this tip in the beginner's guide too.
    Last edited by graysky (2009-09-13 17:48:28)

Maybe you are looking for