Help another dumb question

please help me out here how would i make this class so it reads the class in notepad?
import java.util.Scanner;
public class ch8q3
    public static void main(String[] args)
        int[] validnumbers = { 5658845,4520125,7895122,8777541,8451277,1302850,8080152,4562555,5552012,5050552,7525877,1250255,1005231,6545231,3852085,7576651,7881200,4581002};
        int results;
        int checker;
        Scanner keyboard = new Scanner(System.in);
        //search the array for user value
        System.out.println("enter a charge account number to search for");
        results = keyboard.nextInt();
        checker = sequentialSearch(validnumbers, results);
        //determine if results was found in the array
        if (results ==-1)
            System.out.println("There was no " + results + " in the array ");
        else
            System.out.println("There was " + results + "in the array" + (checker +1));
        //seqsearch
        public static int sequentialSearch(int[] array, int value)
            int index;
            int element;
            boolean found;
            index = 0;
            element = -1;
            found = false;
            //search
            while (!found && index <array.length)
                if (array[index] == value)
                    found = true;
                    element = index;
                index++;
            return element;
}

javakinglow wrote:
please help me out here how would i make this class so it reads the class in notepad?I have no idea what you are asking.

Similar Messages

  • Sorry, another dumb question.

    When I first got my iphone 4s I was able to download a bible.  That was great.  Now I forget what I did to do that.
    I tried to get into the app store and could not connect to the app store.  Do I have to sign into Apple before I can access the app store?  I just cannot understand why sometimes something works for me and other times it doesn't.
    I got help here before and I tried to do it on my own, but I couldn't.  Thanks

    No you do not have to be signed into Apple to use the App Store.
    You must have an Apple ID account and sign in to that on your iPad. See Settings > iTunes & App Store, and login there with yor Apple ID.
    However, it sounds like you are have an internet communication problem in that you cannot reach the Apple web site or App Store.
    Can you reach other internet sites like http://www.cnn.com/ ?

  • Another dumb question about transferring files

    OK - so now I'm trying to transfer (as in move) the photos from my laptop to a portable drive in order to move them to my desktop machine.  I have Lightroom 2.5 installed on both PC Vista machines.  So...how do I do it without messing up my laptop.  I am concerned about what happens to the Lightroom catalog when I export them to my external drive.
    Thank you,
    J.

    One way to do this is to run Export as Catalog to the external, including the images, then from the other machine, run Import from Catalog. You can choose to not export the Previews, as they will be rebuilt in the new location. You can then run the catalog from either machine or the external, but subsequent changes in one will not be carried to the others.

  • Another battery Question - Please help!

    Ok, this is probably going to be a dumb question, but I might as well ask it...On the 30GB Video iPod- it says up to 14 hours of play, when it comes to battery life. Now obviously, I think that means, if you leave your iPod on and not turn it off, it will last 14 hours as far as playing music is concerned, right? I only ask because I use my iPod at the gym and what I do is play music from one playlist, have the backlight set at 2 sec., EQ is off and then play the music on the playlist for 1.5 hours until my workout is done. Then, the next day, I do the same thing. I've noticed that over 5 days, playing my iPod while I work out for 1.5 hours per workout, the battery lasts for about 9 hours total. Does that sound about right? Basically, I'm wondering if my battery is defective or not. Should it last 14 hours total before it needs to be re-charged?

    Well, I do go by the meter, but actually, when the meter is in "red," it lasts me about 2+ hours. When the iPod completely dies, as in music stops playing - I try to restart it, but nothing happens, so I guess my iPod at that time truly does "die out" as far as battery life is concerned...
    But I guess what I was originally asking is this: the first time I charged my iPod, I charged for 5 hours. Then, I took it to the gym, played a playlist for 1.5 hours and then turned it off for the night...I did this same routine for 5 straight days. Then, after 9 hours of total play, *i.e., 1.5 hours x 5 days/5 workouts = 9 total hours before the battery died. Is this normal? Or am I suppose to get more life out of my battery?
    Thanks again for your help!

  • Two really quick/dumb questions!

    Hi All,
    I have just bought a new Mac Mini and hooked it up to my Samsung 55 inch TV via HDMI and everything seems do be working great.
    My two dumb questions are:
    1: where on the new OS (I had a Mac 5 years ago and things have changed) is the top "Finder" bar and "disc" icon to save files?
    2: In Safari I do not seem to have a tools bar where I can for example open another tab for a new web page.
    Hope you can help a nubby :-)

    You are running a Mini so it might be that the screen resolution is not exact for your display. I have used a Mini with a conventional display but not HDTV. You might need to go into the settings for the TV to set the screen resolution to accommodate the mini's capabilities. Sorry that  I can't offer more on that score; when I use my Sony Bravia HDTV  it is with the iPad2 and HDMI and I have encountered no issues. Perhaps someone else on the forum has better insight into the Menu Bar problem on the Samsung as the principal display. 

  • Probably a really dumb question...but so am I

    Just bought a brand new iMac (specs below). Old one? Panther (3.10.9), 1 GHz, 2 RAM, 80 GB space)
    Keeping the old iMac. A perfectly good machine. Only reason I bought a new one: kind of maxed out regarding my primary use of a computer...home music recording. Just needed more space, power, speed, etc.
    Question: Before I call the phone company (our ISP: ATT), want your advice.
    Can I just hook up two computers (both iMacs, one old, one new), on the same telephone line (a land line...this would be the only phone line coming into the house), and have them work? Or, would the ISP, the telephone company, charge us more for doing this? Meaning operating two computers on the same line simultaneously. (Forget about wireless here. Don't use it, not sure that I will anytime soon.)
    Why couldn't I just plug in the other computer into a phone jack in another room in the house and have it work while the other one, in another room but using the same phone line, is running at the same time? Both simultaneously. (Sure, I'd need a modem for each machine going into the ethernet port.)
    As I said, possibly a dumb question. On the other hand, I'm pretty dumb too.
    Thoughts, advice, suggestions? Greatly appreciated.

    It's probably connecting to a broadband modem (DSL or ADSL). That device allows you to get the high speed internet going on using the same phone jack in your house, and connects to the computer through an ethernet cable.
    "Old school" or dial-up modems are traditionally built into the computer or plug into a USB port, and then use a normal phone cord (same thing other phones in the house use). Aside from being super slow, your line is usually busy and you're unable to make/receive calls when you're online.
    I'm guessing you're connecting to a broadband modem (since you mentioned ethernet cable). With that in mind, the answer is yes, you can hook both those computers up so they can be online at the same time. What you need is what's called a router or switch, and they're not very expensive. One line connects to your broadband modem, then you have 3-4 jacks that you can plug additional computers in (so they can all use the connection at once).
    If you want to have the machines in different rooms but don't want to run wires everywhere, look for a wi-fi router, which will usually give you a few jacks for connecting computers that don't have wi-fi but will also let you do a wireless internet hookup for your new iMac, the old one (if it has wi-fi), and even iPhones if you have 'em.
    Apple has two products that might work for you. The Airport Extreme Base Station has super-fast wifi plus jacks for plugging computers in via ethernet, and even lets you share a printer. http://www.apple.com/airportextreme/ The Time Capsule does all that, and also has a built in hard drive (you can get with a 1TB or 2TB hard drive), which is great for using Time Machine. We've had a Time Capsule since they first came out and love it - super easy to set up, and all the backup stuff just happens without having to worry about it.
    Hope that helps!

  • Dumb question re video card

    I bought a radeon 9800 pro graphics card to upgrade my 64mb. stock card and before installing noticed that the new card has one DVI port and one VGA port. the box says it runs dual displays, right now I have dual CRTs running but want to run two flat panels soon.
    so the dumb question, can I convert the VGA to DVI with just a cheap adapter and run dual flats without buying an expensive converter for the second VGA port?

    Hi Prankster,
    you wont be able to get dual digital support from the 9800 ...sorry.
    Of course, you might be able to *physically connect* two digital flat panels to the card but one of the monitor connectors will be recieving an analog video input signal from this graphic card.
    To get true dual digital support from ATI you would need the 9600 or 9700 Pro graphic cards.
    Hope this helps !
    Cheers,
    Chris Chamberlain

  • This is probably a dumb question, but I can't find an answer. How do I make the text on my calendar larger so I can actually read it when I print it out?

    This is probably a dumb question, but I can't find an answer. How do I make the text on my calendar larger so I can actually read it when I print it out? I am using a MacBook.

    Press "Command P" and when the Print dialogue box comes up, towards the bottom there is an option allowing you to choose the text size, i.e: small, med, large.
    Hope this helps,
    NEIL

  • Dumb question but How do you know what generation iPad you have?

    Dumb question but how do you know what generation iPad you have?  I got mine as a gift on Xmas day 2012 but don't know how to find out what version/generation it is.  Can someone help me find that info?  I have looked within settings &amp; elsewhere and I cannot find it.  Thanks in advance!

    Append the last three characters of its serial number to http://www.everymac.com/ultimate-mac-lookup/?search_keywords= and load the page.
    (83797)

  • Dumb Question??

    I hope the philosophy here is that there is no such thing as a dumb question.
    Here goes.
    Adobe Classroom in a Book for Premier Pro states that when opening a New Project under the Project tab you have two choices DV or HDV when in actuality the choices in my version of CS4 are HDV and QuickTime.  I have been under the impression that QuickTime can be either DV or HDV and with that premise I do not understand what my choices are.
    Thanks
    Kent

    Different people's brains work differently.  I am convinced that right
    brain/left brain only scratches the surface.  What is patently obvious
    to one is shrouded in mystery to another.
    (And then there's the issue of *my *brain.  I've killed so many of its
    cells over my 33+ years of adulthood that nothing is obvious anymore.)
    People also make mistakes.  And I mean everybody.
    -Jeff

  • Really dumb question re Quicktime Pro

    Good morning . .
    My Mac is running OS 10.4.9 and I have updated my Quicktime player to 7.3.1.
    Purchased Quicktime PRO, registered successfully but still only get Quicktime Player when opening the program. Any suggestions where to find QT Pro? Sorry for the dumb question but thanks for your help.
    Jon

    There is no separate QT Pro application. Successfully registering Pro enables Pro features already present in the Player. Items that previosly mentioned Pro should now just list the feature without mentioning Pro.
    Message was edited by: Dick Napoli

  • Another newb question: multiple virtual servers

    Hi, I have yet another ignorant question. I have several unrelated web projects that I am working on, and I would like to be able to set up a virtual server for each one for testing purposes, such as: http://project1, http://project2, http://project3. Can someone tell me if this is doable, and if there are any tutorials/resources on this for someone who has 0 experience running a web serer? Sorry for being so ignorant!

    Yes, it is doable.
    You can setup virtual server either by IP or by name.
    If you have one IP, and want to set them up by name (ex. http://project1, http://project2, http://project3) you can do so easily with this type of configuration:
    <virtual-server>
        <name>mydomain</name>
        <http-listener-name>http-listener-1</http-listener-name>
        <host>*.mydomain.com</host>
        <document-root>/www/domain</document-root>
      </virtual-server>
      <virtual-server>
        <name>myotherdomain</name>
        <http-listener-name>http-listener-1</http-listener-name>
        <host>*.myotherdomain.com</host>
        <document-root>/www/myotherdomain</document-root>
      </virtual-server>
    ....The important part here is that
    a) all virtual servers share the same HTTP listener
    b) which virtual server serves the request depends on the $HOST request header send by the client. Sun Web Server does the matching for you. It will match $HOST vs. the virtual server's host attribute. Depending on which site you connect to the right virtual server will be used.
    c) if the $HOST request header does not match any of the virtual servers, then the default virtual server defined in the HTTP listener will be used.
    To create a virtual server, use the Admin GUI, access the configuration, and then add new virtual server. Or use the following CLI command.
    wadm> create-virtual-server --config=myconfig --http-listener-name=http-listener-1 --document-root=/www/docs/myserver.com --host-pattern=myserver.com --log-file=../logs/myserver.com-error_logs myserverHost pattern will be used for matching. Some of this elements might be optional.
    Hope that helps. And keep the questions coming :D
    Edit: Also check the documentation
    Using Virtual Servers in SJS Web Server 7.0

  • May be a dumb question...

    Just got the iphone and am excited and FRUSTRATED! I just read through some of the earlier posts about ringtones and a bug in being able to sinc...just successfully resolved or got around that problem.Now my dumb question is...I played a couple of tracks I downloaded but seem unable to stop the track...I can pause it but unable to stop it...please help me.
    Thank GOD for you guys.

    single touch the screen when a song is playing and some extra controls that let you pause/stop a song come up. it also shows a slider so you can drag your finger through a song to skip to the part you want to hear.
    also, depending on how your iphone is configured, try pressing the home button twice (i.e the rounded square button). if you click that twice, quickly, you may see control come up that let you pause/stop a song.
    check out the tutorials movies on the apple support site for lots of useful tips.

  • Dumb question Mac Mail inbox synchronisation

    I'm really sorry if this is a dumb question...I have just started using Mac Mail (from Entourage) with a .Mac account and want to synchronise my messages across my two Macs. I thought that if I deleted messages on one mac, they would be deleted from the server and when I checked mail on the other Mac they would be gone. However, this does not seem to be the case - instead, I need to delete them on both macs. Is something in my setup wrong?
    Thanks for any help

    I haven't....are you saying you think I should? Funnily enough, after never having had a problem before, I had a problem syncing my bookmarks yesterday, so maybe I should resetting the SyncServices.
    Also, on the .Mac preferences - does it matter if the syncing schedule is set to be automatic, every hour, manual etc? Previously I had it set as manual, but maybe I need to set it as automatic?
    Thanks again so much for your help.

  • HT5312 This whole security question crap is a hassle. If I wanted to talk to someone one the phone to have some dumb questions reset, I would call them. Why can't they just send it in my dang e-mail. So forget it. I'll just forego the purchase.

    This whole security question crap is a hassle. If I wanted to talk to someone on the phone to have some dumb questions reset, I would call them. Why can't they just send it in my dang e-mail. So forget it. I'll just forego the purchase.

    Then call iTunes Support and get them reset:
    http://support.apple.com/kb/HT5699?viewlocale=en_US
    or by email:
    https://ssl.apple.com/emea/support/itunes/contact.html
    If you have another iOS device or another SMS-capable device, you can use this method:
    http://support.apple.com/kb/ht5570
    Read the entire article carefully to see if this method would be a preferable approach for you.
    Cheers,
    GB

Maybe you are looking for