Somebody help the newbie!

Hi. its the first time i'm looking at java or ppo btw.
well what i needed to know is how to create a vector, add things, delete things, from it and how to use it outside the class he was born in.
oh and another very newbie quizz.
whats the difference between the class and the constructor method?
they both must have the same name i know, but in examples i've seen sometimes there are variables declared before the class, then others before the constructor and then others inside the constructor... im confused.
help! :)
thx

O dear :-)
OK the constructor of a class is often used to initialise parameters or setup something so for example
class Test
Private int number=0;
public void Test()
System.out.println("In contructor");
number = 10;
System.out.println("Number=" + number);
As for the vector class you can only add objects not built in types.
So you cant use it for ints but u you can for Integers.
Add item
vectorName.addElement((Integer)number);
Return an item
Variable = (Integer)vectorName.elementAt(0);

Similar Messages

  • Please help the newbie!

    I've created a photo gallery in Flash CS3 that contains 2 UI
    Loaders (one for a graphic title for the image, and one for the
    image itself) and have tested it and it works fine. I even
    published the file as an independent html file and it seems to work
    fine when tested in the browser too. My problem is that when I
    place the .swf into my html page in dreamweaver and test it, the
    file shows up, but the loader info doesn't work. The images don't
    load.
    Here is the code I have set up in Dreamweaver -
    Within the head, I have this:
    <script src="../Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    Within the body, I have this set up for where the swf gallery
    is supposed to be:
    <div id="content_main">
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','911','height','540','title','Photo
    Gallery','movie','../flash/photography2','quality','high','loop','false','play','false'
    ); //end AC code
    </script><noscript><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
    width="911" height="540" title="Photo Gallery">
    <param name="movie" value="../flash/photography2.swf"
    />
    <param name="quality" value="high" /><param
    name="LOOP" value="false" /><param name="PLAY" value="false"
    />
    </object></noscript>
    </div>
    Can anyone help? Thanks so much. I appreciate any help I can
    get.

    Two suggestions -
    1. Please help yourself by using a subject line that is
    descriptive of your
    question/issue. Can you imagine how many posts there are that
    have exactly
    this subject? Later when you want to find this thread, you
    will be deep in
    the mud of other newbie posts.
    2. When you post a question about problems with your layout,
    please always
    post a link to the uploaded page? That way we can all examine
    the page's
    behavior, look at the code, and give you a precise answer.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mjordan1965" <[email protected]> wrote in
    message
    news:[email protected]...
    > I've created a photo gallery in Flash CS3 that contains
    2 UI Loaders (one
    > for a
    > graphic title for the image, and one for the image
    itself) and have tested
    > it
    > and it works fine. I even published the file as an
    independent html file
    > and it
    > seems to work fine when tested in the browser too. My
    problem is that when
    > I
    > place the .swf into my html page in dreamweaver and test
    it, the file
    > shows up,
    > but the loader info doesn't work. The images don't load.
    >
    > Here is the code I have set up in Dreamweaver -
    >
    > Within the head, I have this:
    >
    > <script src="../Scripts/AC_RunActiveContent.js"
    > type="text/javascript"></script>
    >
    > Within the body, I have this set up for where the swf
    gallery is supposed
    > to
    > be:
    >
    > <div id="content_main">
    >
    > <script type="text/javascript">
    > AC_FL_RunContent(
    > 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
    >
    version=9,0,28,0','width','911','height','540','title','Photo
    >
    Gallery','movie','../flash/photography2','quality','high','loop','false','play',
    > 'false' ); //end AC code
    > </script><noscript><object
    > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    > codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
    > rsion=9,0,28,0" width="911" height="540" title="Photo
    Gallery">
    > <param name="movie" value="../flash/photography2.swf"
    />
    > <param name="quality" value="high" /><param
    name="LOOP" value="false"
    > /><param name="PLAY" value="false" />
    > </object></noscript>
    >
    > </div>
    >
    > Can anyone help? Thanks so much. I appreciate any help I
    can get.
    >

  • Wrt54g and hughesnet hn7000s. firewall fails sheildsup.(help the newbie)

    Hello im still new to the networking stuff so here it is, no matter which computer i use(LAPTOP,DESKTOP,IMAC) it fails the sheildup test on grc.com everytime. for some reason when i go to dialup it passes the test.i set up the router again another failure. i have also looked into the hn70000s modem called tech support, no help there.
    is my problem the router or the modem, i did find settings page for modem that had a modem disabled box but no way to enable.
    thats about alli know, please help!

    O.K. First, let's find out what you are doing.
    When you run the test, how exactly is your setup:
    - if your router is connected to the modem, any port scan service in the internet will always scan the router. It does not matter from which computer inside your LAN you start the scan. You have one internet IP address which is assigned to the internet interface of the router. Therefore, the test must also ways report the identical results regardless from the computer behind the router which starts the scan. Due to the NAT router the computer behind the router is not directly accessible not is it possible to scan the computer behind the router unless you configure a DMZ or port forwarding.
    - If the computer is directly connected to the modem and connects to the internet a port scan service in the internet will actually test the open ports on the computer itself.
    Thus, if you scan through the router (without DMZ or port forwarding) the firewall on the computer itself is irrelevant.
    Second, you don't write what test you do exactly. There is no direct button on grc.com to "test all ports". You can test all service ports which is ports 0-1055.
    Third, if the port scan reports most of the ports as "open" this is very unlikely to be true. All ports open would mean that there is some service listening on those ports. Even the fattest server with a lots of services will never listen to all those ports.
    You should check what device actually is in the front line, i.e. really connected to the internet directly on the IP level. The internet port scan like grc reports your current IP address. This is usually the IP address assigned by your ISP. Please check the status on your WRT to see what IP address it is actually using. Open http://192.168.1.1/ and go to the Status tab. There you can see the IP address of the router on the internet interface. If this is not the IP address mentioned in the port scan your router is actually not directly connected to the internet. In that case your modem is most likely also a router device. If you see open ports in a port scan those would be on the modem/router and not on the WRT.

  • Printer debacle, help the newbie

    I am new to SAP so don’t be too hard on me.  We are several months into running SAP and have several issues that we can’t seem to get resolved.  One of the most nagging issues is that we can only print shipping documents and box labels to one printer.  I don’t know the exact terms for how we are setup but it doesn’t allow a user to define where he wants to send the output of the transaction.  So we have up to four people directing output to one paper/label set of printers.  We would like each workstation to print to the paper and label printer that sets right next to it.  I don’t know if the consultants haven’t had the experience to know the correct way to set this up or this is just the way it is going to be but it is driving us, the workers, nuts.  Any ideas on how this can be corrected?  Does this involve changing code or is it something that can be changed on a settings screen?  Sorry for the partial rant.

    This message means that the javac.exe file cannot be found. You could get round this by navigating to the jdk /bin directory and then run the command, but the best way is to add the /bin directory to your PATH environment variable.
    To do that, go to the Windows XP Control Panel and click on System. Click on the "Advanced" tab and then on "Environment Variables". If there is a PATH variable already defined, then add your jdk bin directory to it (e.g. c:\jdk1.4\bin). If there is no PATH, add it.
    This should enable you to run javac and java from any directory. To anticipate your next problem, you also need to set a CLASSPATH environment variable so that the JVM can locate your compiled java classes. There are lots of previous posts on this subject or you can post again.
    Hope this helps.

  • Help the newbie

    I'm so new to Dreamweaver. I can only create static webpages
    but now I really have to create a page with dynamic contents (like
    get live data from a db), lots of layer manipulation(like layers
    changing sizes, etc) and javascript. Any recommendations on books
    that I should read to learn really fast? Any links?
    Please help. Thanks.

    newbiejane wrote:
    > I'm so new Dreamweaver. I can only create static
    webpages but now I really have
    > to create a page with dynamic contents (like get live
    data from a db), lots of
    > layer manipulation(like layers changing sizes, etc) and
    javascript. Any
    > recommendations on books that I should read to learn
    really fast? Any links?
    >
    > Please help. Thanks.
    >
    >
    >
    If you need to do it soon, the best advice anyone can give
    you is to
    hire someone already proficient in these things (not sure
    what you mean
    by "layer manipulation," though).
    Otherwise, you need to get a book, take a class, or sign up
    for online
    training videos, depending on your learning style, and
    depending on
    what your host supports, and learn PHP, ASP, or CF (there are
    others,
    these seem to be the most commonly mentioned these days). It
    also would
    help to learn some theory about constructing databases
    efficiently.
    I am only a beginner myself, and if I needed something like
    that in a
    hurry I would probably try to hire a PHP person I know from
    this ng
    (Steve Fleischer, Gary White, there are quite a few who
    answer PHP
    questions frequently here) to do it for me.
    In the long run, I have bought and started to study these two
    books:
    Database Design for Mere Mortals (don't remember author
    offhand but you
    can find in any online bookstore) and
    PHP for Dreamweaver 8 by David Powers (who also frequents
    these and
    other newsgroups).
    Still, unless you can devote hours a day to this, it takes
    time to
    learn, and you can mess up a lot more much more quickly using
    dynamic
    pages than you can with a simple html page.
    Another option, depending on your needs, would be to delve
    into an
    existing content management system such as Joomla, Website
    Baker, etc.,
    but from what I've observed with others' experience, these
    can be more
    or less difficult to customize depending on your level of
    expertise and
    the adequacy of the documentation.
    Bonnie in California
    kroko at
    sbcglobal dot net
    http://www.theanimalrescuesite.com/cgi-bin/WebObjects/CTDSites.woa

  • Help the newbie of all newbies! Have a heart!

    Please help me.
    After i downloaded and installed the j2sdk1.4.0, i wrote a program and tried to compile it.
    Since this is the first time i tried to run a program out of school, i have no idea what's wrong. in school we use unix, i have windows xp at home.
    so i'm at the command prompt
    c:\java>javac P5.java
    (return)
    the computer decided not to let me go through
    'javac' is not recognized as an internal or external command operable program or batch file.
    (said the computer)
    i have no idea what this means, sorry if i come off as very stupid or ignorant. But please, please, some one help!
    thanks, and wishes
    jenny

    This message means that the javac.exe file cannot be found. You could get round this by navigating to the jdk /bin directory and then run the command, but the best way is to add the /bin directory to your PATH environment variable.
    To do that, go to the Windows XP Control Panel and click on System. Click on the "Advanced" tab and then on "Environment Variables". If there is a PATH variable already defined, then add your jdk bin directory to it (e.g. c:\jdk1.4\bin). If there is no PATH, add it.
    This should enable you to run javac and java from any directory. To anticipate your next problem, you also need to set a CLASSPATH environment variable so that the JVM can locate your compiled java classes. There are lots of previous posts on this subject or you can post again.
    Hope this helps.

  • JSP back-end interface to Remote server. Please help the newbie

    Could someone comment on pros and cons of the JSP back-end interfaces to the remote server/programs using..
    (1) Socket Interface between JSP and Remote Server. One socket for one JSP session. JSP to create and delete the socket when done.
    (2) RMI between JSP and Remote program.
    (3) Message Exchange using JMS between JSP and the Remote Server.
    (4) Peer-to-peer JAXM message exchange. JSP/JAXM Client to Remote JAXM Server
    (5) Anything else?
    Thanks in advance..

    (1) Socket Interface between JSP and Remote Server.
    One socket for one JSP session. JSP to create and
    delete the socket when done.JSPs are compiled to servlets, which use the HTTP protocol. The remote server should be the servlet/JSP engine.
    (2) RMI between JSP and Remote program.As soon as you say "JSP", you're assuming HTTP request/response. If you want to talk to RMI objects, I think that's best done elsewhere than a JSP. They really should be for interface only. Have your JSP talk to a central, front controller servlet and have it invoke methods that deal with RMI objects or EJBs or POJOs on the back end. That stuff doesn't belong in JSPs, IMO.
    (3) Message Exchange using JMS between JSP and the Remote Server.No.
    (4) Peer-to-peer JAXM message exchange. JSP/JAXM
    Client to Remote JAXM ServerNo. This is crazy. JSP = HTTP, which is client/server by definition.
    (5) Anything else?All these might be fine options, but they don't belong in JSPs. Those should be for Web interface, a thin client. The details of how you process (e.g., RMI vs. EJB, synchronous vs. asynchronous, etc.) are best encapsulated somewhere else besides a JSP.
    HTTP is a client/server, synchronous, request/response protocol, of course. As soon as you say JSP, these assumptions are built into your system. You can do asynchronous processing, but you still have to send back a response synchronously (e.g., "Your order is being processed. Please come back.")

  • Parameter incorrect (help the newbie?)

    Hey,
    I'm using Dreamweaver 8 and I'm having rather a lot of
    problems with error messages saying "parameter incorrect". I can't
    understand what it means, and it is paralyzing my work.
    For example, I'll be trying to change links sitewide and then
    put all recently modified so that my new links will be functional.
    But there are always parameter incorrect errors, and every time one
    pops up, it blocks the whole putting process, disconnects me from
    the server, and there seems to be no way of cancelling the process
    or reconnecting... other than restarting the program with
    ctrl-alt-del. Annoying! Parameter incorrect messages are preventing
    ALL site-wide updates now.
    I had a tip from someone to install the 8.0.2 updater, but
    the person who did this seems to have had a different sort of
    problem. I am trying it, and I have the installer CD, but what I do
    not have is a working cd rom! So I'm trying to see if the
    workaround suggested by Adobe can solve my problem, but I'm not
    super optimistic.
    Have any of you had experience with this? Any suggestions?
    Hopefully,
    Sidsel
    ps. this is the workaround - problem is the trial version
    I've downloaded is of course no longer dw 8 but cs3... but anyway,
    this came from
    http://www.adobe.com/support/documentation/en/dreamweaver/dw8/releasenotes.html
    "If you installed Dreamweaver 8 from a CD, you will be
    prompted to insert the CD when running the 8.0.2 updater. If you no
    longer have the CD, you can try the following workaround:
    1. Download the Dreamweaver trial version installer from the
    Dreamweaver website.
    2. Launch it.
    3. Once the Welcome dialog box appears, browse to
    C:\WINDOWS\Downloaded Installations\Macromedia Dreamweaver 8.
    4. Copy the msi installer to the desktop (or anywhere).
    5. Quit the trial installer.
    6. Launch the 8.0.2 updater.
    7. When prompted for the original CD, click the Browse
    button and select the msi from step 4.
    8. Finish the installation."
    Text

    I just started getting this problem with DW CS3, it just
    suddenly showed up after never having done this for months of using
    this program.
    It is unacceptable to reinstall the program to get around
    this problem.

  • Pen tool in In design not working, please help the newbie!

    Hi there,
    I am very new to in design, I am trying to work the pen tool which previously worked when I was playing around with it on a previous version of in design but I have now downloaded the creative suite and when i use this in design if I am trying to draw a shape it creates black patches that firstly make it hard to move to the next point as it covers the image and then when I go to cut out the image and paste into its gone. 

    You have a fill selected as your default so when you create a shape it's being filled with color. Before you start drawing, set Fill to none and Stroke to a value like 1 point.

  • Help the Newbie, plz

    I have another question. Let say that I ave 6 channels for testing and I have the VI to do I/O for the each channel. However, depending on the testing period, it sometimes takes a long time. So, how can I automate the process. Let say for channel 1, it gets the defaulted I/O paths and moves onto Channel 2 once channel 1 is done without me being there to do it manually? Thank you in advance.

    First thing to do is to go to http://www.ni.com/devzone/lvzone/fundamentals.htm and check some of the resources available for training. As far as answering your question directly, you can use any number of methods. One is to put you existing program inside a for loop. If you create an array of test setups and put it outside the loop and wire the array through the for loop, the auto-indexing feature of a for loop will automatically extract each element, run the test, extract the next, run the new test, etc. until all of the array elements have been extracted. The for loop will then automatically stop. You can also use a while loop. This will give you a bit more flexibility but you have to do some more coding. You would bascially get the array size, and tell the while loop to stop when the iteration count is greater than the array size. The advantage of a while loop is that you can add a stop button if you want to prematurely stop. A while loop will not automatically auto-index and array but it can be selected by clicking the entry tunnel and selecting it.

  • HELP the Newbie Please??? / MetaData Issue

    Hello All
    I'm using the Trial Version of Premiere Pro on my HP PC
    I am trying to use MetaData in an effort to Convert Audio to Text BUT...
    the "Analyze" Tab is not visible on the lower right of the preview screen.
    And my Extensions are grayed out.
    Is this because I'm using the Trial Version?
    If not, what would I need to do to activate my Disabled Extensions??

    Thank You Mark for your response.
    As embarrassing as this is to admit, I was actually able to find what I was looking for. I needed to "manually" expand the preview monitor to see the "Analyze" tab under Metadata.
    I'm now seeking instruction on uploading the completed project to YouTube so please....wish me luck. lol

  • I have a problem with my apple tv, I can watch my music of my mac in the TV but I cant transmit  music or video from my mac to my apple tv because not appear the logo Apple Tv in my itunes.  Somebody help me?

    I have a problem with my apple tv, I can watch my music of my mac in the TV but I cant
    transmit  music or video from my mac to my apple tv because not appear the logo
    Apple Tv in my itunes.  Somebody help me?

    Welcome to the Apple Community.
    The Apple TV 2 doesn't show up under devices like the Apple TV 1, to send video and music to the Apple TV you need to use the Airplay Option which appears in the lower right corner of iTunes.

  • Can somebody help me in finding a solution or an explanation to the problem I am currently experiencing as well as others wherein we cannot connect to the iTunes store (iTunes could not connect to the store. An unknown error occurred (0x80096004))?

    Can somebody help me in finding a solution or an explanation to the problem I am currently experiencing as well as others wherein we cannot connect to the iTunes store. An error message appears and either says "iTunes could not connect to the store. An unknown error occurred (0x80096004). Make sure your network connection is active and try again" or "iTunes could not connect to the store.Make sure your network connection is active and try again." Despite the fact that my network connection is working quite fine, this problem still persists. I can say that my connection is fine because I can surf the internet and furthermore, I used to connect to the iTunes store just before this incident happened which started from April 17, 2014 and persists until today. I tried to solve the problem by following the troubleshoot procedures given in the support section of this site but it really did not solve the problem. I believe that others are experiencing this situation as well very similar to mine when it comes to the time of occurrence as I have read in the discussions in this site. Even though we have different network connections, operating systems and other specifications, we still experience the same problem, so is there really a problem with our computers or is it with the iTunes? And by the way, my computer works under Windows XP. Thanks a lot. God bless.

    Try this...
    Triple click anywhere in the line below to select it and press Ctrl+C to copy it.
    cmd /k netsh winsock reset
    Press the WinLogoKey+R to open the run dialog, then Ctrl+V to paste, then press enter/return.
    You should get something similar to this:
    Reboot the computer and the problem should be resolved.
    If it doesn't work then perhaps a full tear down and rebuild of iTunes will fix things. See Troubleshooting issues with iTunes for Windows updates for details.
    tt2

  • I am new with iMac and I am trying to copy some file from my external HDD but it does not let me also I can't delete anything from this HDD using the finder. Can somebody help me , please?

    I am new with iMac and I am trying to copy some file from my external HDD that a used with my PC but it does not let me also I can't delete anything from this HDD using the finder. Can somebody help me , please?

    No, unfortunately, when you format a drive, it will erase all the contents. So you will need to find a temporary "storage" place to put the stuff using a PC so you have access to it. Then reformat using Disk Utility (Applications > Utilities). If only using with mac, format Mac OS Extended (Journaled) and use GUID Partition scheme under Partitions/Options. After formatting, you can drag the files back.

  • My new I5 uploaded doubleded all the songs from my library! Please, can somebody help me showing how can I delete just the songs that was doubled?

    Hi there everybody,
    My new Iphone 5 uploaded doubleded all the songs from my library! Please, can somebody help me showing how can I delete just the songs that was doubled?
    Some help will be greatly appreciate.
    Thanks much!

    When you say "account," do you mean your iTunes library, because your iTunes library is what is on your computer?  Your iTunes library does not have an email address.  An account that is related to iTunes is your Apple ID (which is an email address) and you use it as your user name to sign in to the iTunes Store, to make purchases.  Changing your Apple ID will not make songs disappear from your computer's iTunes library.
    If you had an Apple ID and used it to make song purchases from the iTunes Store, and then started using a different Apple ID, you should be able to re-download the songs purchased with the old Apple ID.  In iTunes, sign in to the iTunes Store using your OLD Apple ID (and password).  That may not be your current email address, but Apple uses it as your user name, so it does not matter.
    On the iTunes Store Home screen, click on Purchased under QUICK LINKS.  This takes you do the Purchased screen, where you can re-download previous song purchases (for that Apple ID) at no cost. 
    NOTE:  If those song purchases are from more than a few years ago, you may also need to authorize your computer to play (and sync) songs for your old Apple ID. 
    For songs that were not purchased from the iTunes Store, if they are also gone, you cannot get them back unless you have a backup (or they are still loaded on your old iPod).
    If that's not what you mean by "changed the email address on my account," please post back with more details.

Maybe you are looking for

  • Error downloading from creative cloud site

    Adobe genuine software validation failure. The product you are trying to install is not an adobe genuine software and appear to be counterfeit

  • Unexplained display brightness changes

    After a search of the forums, I understand that this issue has been floating around for a couple of years. I haven't found any explanations or resolution. I have an iMac G5, 1.6GHz. The computer seems fine in most respects except for one annoying "fe

  • Question about keyword hierarchies

    Hi, I'm relatively new to Lightroom. I'm seeing an "interesting" behavior with respect to hierarchical keywords and I'd like to understand if it is correct. To start with, I've got an example keyword hierarchy for aircraft: So far so good. Now, I hav

  • How does one create this effect...

    I want to make text or any shape really be like almost engraved into any image. For an example look at the gts part of this background image. http://i1.ytimg.com/bg/H-_hzb2ILSCo9ftVSnrCIQ/115.jpg?app=bg&v=4ed767bf or the text in this just without the

  • How to fix corrupted Flash cs5 Project?

    I should have known better than to attempt to copy MovieClips from a Flash cs4 project that got converted into a Flash cs5 project, I copied a couple MovieClips to my flash cs5 project and then it asked me if I want to overwrite the components or not