Ok ignore that last thread  ,now have a bigger problem

I have a class called Cinema with the following constructor:
public Cinema(int num1, int num2){
In a separate main application class i have:
Cinema [ ] customerArray;
customerArray=new Cinema[3];
customerArray[0]=new Cinema(3,88);
customerArray[1]=new Cinema(6,789);
customerArray[2]=new Cinema(34,10);
JOptionPane.showMessageDialog(frame,""+customerArray[1].int2);
can someone please tell me why this gives me a message saying "null"?
why are the elements still set to null?
sorry if this is a rookie question but i am only a first year student so cut me some slack? thanks a lot guys

>
Exactly !!! No not exactly.
first of all check whether the variable u r calling
ie. int2 , is present in your "Cinema" class.
Furthermore, even if it iz present whether it iz
accessible to the object directly.
What I mean to say is that.... make sure tht. the
variable u wanna retrieve is defined in 'Cinema'
class & moreover.... it iz defined public
All of that is meaningless.
The OP stated that the application compiles and runs. If the item wasn't public then that would not be the case. If it wasn't accessible then that wouldn't be the case either.
Moreover it can't be an int nor any other primitive.
There is only one way "null" can show up with the given code and that is if int2 is a reference variable and it has the value of null.

Similar Messages

  • When watching a movie every 7 seconds there is a very short freeze or shutter.  The last 5 movies have had this problem.

    When watching a movie every 7 seconds there is a very short freeze or shutter.  The last 5 movies have had this problem.  Iam unsure what to do.

    Welcome to the Apple Community.
    Check that no special effect or enhancement feature has been turned on on the TV itself.

  • Installed iTunes on my laptop Windows 7 64 bit and I now have the following problems 1) iTunes volume won't adjust with the laptop volume control, only within iTunes, 2) playback doesn't work unless I click play twice and 3) the iTunes Store won't open

    Installed iTunes on my laptop Windows 7 64 bit and I now have the following problems 1) iTunes volume won't adjust with the laptop volume control, only within iTunes, 2) playback doesn't work unless I click play twice and 3) the iTunes Store won't open

    Installed iTunes on my laptop Windows 7 64 bit and I now have the following problems 1) iTunes volume won't adjust with the laptop volume control, only within iTunes, 2) playback doesn't work unless I click play twice and 3) the iTunes Store won't open

  • Downloaded latest update ios 5.1.1.last night - now have problem with my email some being sent others not - any ideas?

    Downloaded latest update for iphone 4 ios 5.1.1. last night - now having problems with my emails - all show being sent - but not being received also no b.c.c. to myself coming up on iphone.  Any ideas?? 

    The passcode settings simply give you the option of having the passcode lock immediately you lock the screen, or after a delay period.  If you set a delay the passcode lock will not activate for the period of the delay.  I have mine set to one minute.  It is a "convenience" measure to save me having to re-enter the passcode if I lock the screen then immediately remember that there was something else I wanted to do.  Obviously this entails a small compromise on security and if you are at all concerned then you should set the passcode to "Immediately".  It really has nothing to do with the camera short-cut (though loads of users seem to have run away with this notion).  It would be the same if you just did "slide to unlock" during the delay period.

  • Upgraded one iPad to 8.1 about 10 days ago since then have to restart wireless hub each day to use, other iPad on previous os no problem until upgraded yesterday now have the same problem although both devices show wireless connection.

    we have two iPads (ipad2 and an iPad mini). The ipad 2 was upgraded to os 8.1 about 10 days ago, since then I have to restart my wireless hub every day to use the ipad. I have however been able to use the iPad mini running on the previous os without any problem. Last night I upgraded the mini to os 8.1 and this now suffers the same problem. Both iPads display a strong wireless signal to my hub but don't want to seem to connect.  I have had BT check my broadband connection and they found no problem, whatever is causing it has happened since upgrading from 8.0.2 to 8.1

    Do you have an updated version for your AirPort?

  • After the KitKat update, I can't answer the phone anymore.  What's up with that? I now have to call everybody back since I cannot answer the phone anymore

    The phone rings. I used to be able to press a green button to answer the phone. No more green button, just a flashing button of some kind. If I press it, nothing happens. I am sick of developers being so cute that they make their software unusable,

        I apologize for the problems you've since the update codemeisterbob. The developer intends for the update to enhace the phone's function. Let's make sure settings are correct. From your phone screen access the Phone app, the from the Dialer Tab, select the Menu icon. Then, select Settings, check for the answer settings to make sure you get the option you want.
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • I have a bigger problem than I can fit into a single sentence; now what do I do?

    I have a used Dell desktop running Windows 2000 Pro NT that I got for free when a rural elementary school closed down in the neighboring county. I have been using this computer for two years as a normal user, as I don't have access to administrative privileges. As the school no longer exists, I can't just contact them to inquire as to what the administrator password may have been or what faculty member may have used the computer. Operating as a normal user has only presented very occasional minor aggravations... until now. After having to switch from my old FireFox to the new "FireFox 4-beta 12, ActiveX has magically appeared and has been wreaking havoc. I have found over seven million sites elaborating in great detail about how to add and install ActiveX, but none to explain how to disable and delete it. I can't just go to control panel/ security settings because I do not have administrative privileges to change or even access many suddenly important functions. ActiveX pops up on my control panel screen (and many others) and causes the icons to be displayed on the far left of the screen with a large blank area on the right two thirds of the screen. When I try to click on any of the control panel functions, the text will highlight in blue but will not allow me to access ANY of the functions. I have tried some of the highly praised "boot discs", including the heavily worshiped "Eunet..."something or other, now known as "Pogostick". Everything has failed. In the fine print, they all confess that it cannot edit the administrator or promote a normal user to administrator status on W2K Pro NT. This ActiveX JUNK that installed it's self during my beta 12 "upgrade" has made my computer unusable in a number of ways. And because of this administrator problem, there's nothing I can do about it. Come on, now! Are you telling me that we can build a rocket ship that can fly it's self to the moon, land, take pictures and grab a few rocks, then fly it's self back to Florida, but nobody in the world has been genius enough to outsmart an eleven year old operating system? If 2000 Pro NT was that impenetrable, the government would be using it. I need help, and I know that someone has the answer.

    Firefox does not use ActiveX and will not have been installed when installing Firefox beta 12. ActiveX is an Internet Explorer plugin system and does not work with Firefox.
    This will not be a Firefox issue, you should try asking in a Windows support forum such as the Windows Secrets forums - http://windowssecrets.com/forums

  • Fixed - updater - now have music update problems

    SO after numerous installs and uninstalls of updater and itunes, i finally got my ipod to connect and update with Win XP...now a new problem has surfaced.
    My ipod (20gb 3rd gen click wheel) has "all" the songs on it, but only about 66% are actually copied correctly. Some of them simply dont exist, the titles do, but there is no song when i try and access that file. some songs copied fine and i can listen, but some didnt..i can listen to them in full on my computer, so i knwo the source file is good..
    ummm...suggestions?

    You can downgrade a DMP the same way you upgrade it. Just select the older version of code for your player when you have finished testing in your lab environment.
    Sent from Cisco Technical Support iPad App

  • Connected seagate HD with recovered data now have 2 iPhoto librarys

    Connected a seagate external HD with data they retrieved from a external HD that stopped working.  After connecting that HD I now have 2 iPhoto libraries, which are locked.  Get a warning when open iPhoto.  Can libraries be combined?

    Couple of things to try:
    Restart your mac and try launch iPhoto again.
    If that fails:
    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Look there for a file called ‘iPhoto’Lock.data or similar. Drag it to the Desktop. Make no other changes. Start iPhoto. Does that help?
    If not: Where is your iPhoto Library stored? If it's on an External Disk, what format is that?
    If you have Aperture 3.3 or later and iPhoto 9.3 or later you can merge libraries with Aperture.
    Otherwise the only way to merge Libraries is with the paid ($30) version of iPhoto Library Manager

  • HT1577 I buy item in game but i'm not receive the item that i buy and have billing to me. How i do next?

    I buy item in game but i'm not receive that item and now have billing to me.
    Please help how i do the next?
    <Personal Info Edited By Host>

    Contact iTunes Customer Service
    Apple  Support  iTunes Store  Contact Us

  • After uploading our phones with the latest update, we have noticed that the battery life has deminished considerably.  I now have to charge my phone overnight and two or three times a day. Prior to the update, my battery life lasted me at least a full day

    After uploading our phones with the latest update, we have noticed that the battery life has deminished considerably.  I now have to charge my phone overnight and two or three times a day. Prior to the update, my battery life lasted me at least a full day.  We have several phones in our office and the ones that have updated (4) now have issue holding a charge/battery life. I really liked this phone and can not believe that you are now going to charge us $79 a battery to fix what is most definately a problem with your latest update.  I know other people outside of our company that are having the same problem. Not to mention when I called AT&T it was confirmed to me that they are hearing the same issue and then some from other customers as well.  Your own people, once I talked to them earlier today, told me they are showing a history of issues that are showing up after the update was put in place. Of course she tried to say, "Maybe the age of the battery and the update both contributed".  Whatever. 
    I want you all to know how disappointed I am in your company for the handling of this issue.  I always thought "Apple" was the line I didn't have to worry about having any types of issue. And that you all would stand behined your product 100%. Now I am not so sure.   
    I would love to hear back from your company on how you perceive the issue with all of these phones that prior to the update didn't have any issues and how after the update THEY ARE NOW having issues.  I do not believe this was an issue due to the age of a battery and that was pretty lame to say so.  It was fine and now its not.
    Please feel free to contact me and help me figure out a way to pay for all of the batteries that will be needed for our company to contiue doing business as needed.
    Thank you.
    Web Address (URL):
    5106 McNarney

    Sorry this is a user to user technical forum.  There is NO APPLE here as stated in the term of use when you signed up for this forum.
    here are some battery tips
    http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/
    http://www.apple.com/batteries/iphone.html

  • I am being charged for 3 GB that apparently Verizon hadn't caught up on that I had used!! The last night of my cycle I called and checked and I had .5 GB left and right before midnight when the cycle ended it caught up on 3 GB!! I now have to pay for this

    SO CRAPPY!!! SO FED UP WITH VERIZON!! WE ARE GETTING SCREWED OVER!! I am being charged for 3 GB that apparently Verizon hadn't caught up on that I had used!! The last night of my cycle I called and checked and I had .5 GB left and right before midnight when the cycle ended it caught up on 3 GB!! I now have to pay for this data I know I did not use! I never have my data on!! Now it says I used 7 GB last month!!!

    Data usages are always estimated...I don't believe any carrier post data usage in real time.  I've had my data increased due to a large chunk being unaccounted for at the time of my cycle.  Thankfully when I'm billed for it...it has never pushed me over my limit. 

  • I reinstalled microsoft word and now have a copy that will not work that is the default

    I reinstalled microsoft word and now have a copy that will not work that is the default

    I have MS word 2008 for MAC version 12.1
    When I left click the MS word applications that is the default seems to be corrupted as indicated by the message below but when I right click i can select the second MS word application that works.  The message from the left click is
    Process:         Microsoft Word [10367]
    Path:            /Users/geralddowling/Library/Mail Downloads/Microsoft Word.app/Contents/MacOS/Microsoft Word
    Identifier:      com.microsoft.Word
    Version:         ??? (???)
    Build Info:      Unknown-80409~0
    Code Type:       X86 (Native)
    Parent Process:  launchd [128]
    Date/Time:       2011-07-25 17:25:09.413 -0400
    OS Version:      Mac OS X 10.6.7 (10J869)
    Report Version:  6
    Interval Since Last Report:          166920 sec
    Crashes Since Last Report:           5
    Per-App Crashes Since Last Report:   5
    Anonymous UUID:                      1C5621D4-1D85-488D-A24C-CB298759DBC6
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread:  0
    Dyld Error Message:
      Library not loaded: @executable_path/../Frameworks/MicrosoftComponentPlugin.framework/Versions/12/M icrosoftComponentPlugin
      Referenced from: /Users/geralddowling/Library/Mail Downloads/Microsoft Word.app/Contents/MacOS/Microsoft Word
      Reason: image not found
    Binary Images:
    0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld
    Model: iMac10,1, BootROM IM101.00CC.B00, 2 processors, Intel Core 2 Duo, 3.06 GHz, 8 GB, SMC 1.53f13
    Graphics: ATI Radeon HD 4670, ATI Radeon HD 4670, PCIe, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x8F), Atheros 9280: 2.1.14.5
    Bluetooth: Version 2.4.0f1, 2 service, 19 devices, 1 incoming serial ports
    Network Service: AirPort, AirPort, en1
    Serial ATA Device: ST31000528ASQ, 931.51 GB
    Serial ATA Device: HL-DT-ST DVDRW  GA11N
    USB Device: Keyboard Hub, 0x05ac  (Apple Inc.), 0x1006, 0x24300000
    USB Device: Cruzer Mini, 0x0781  (SanDisk Corporation), 0x5150, 0x24310000
    USB Device: Apple Keyboard, 0x05ac  (Apple Inc.), 0x0220, 0x24320000
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8502, 0x24400000
    USB Device: Internal Memory Card Reader, 0x05ac  (Apple Inc.), 0x8403, 0x26500000
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000
    USB Device: Back-UPS ES 750 FW:841.I3 .D USB FW:I3, 0x051d  (American Power Conversion), 0x0002, 0x06400000
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x06100000
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8215, 0x06110000

  • I'm trying to use my iphone 3g as an ipod now that I've upgraded to an iphone 4.  But it is telling me that I need to have a sim card in my iphone 3g to use it.  I don't want to use it as a phone at all so I wouldn't think that I need a sim card.

    Actually, I wanted to let my son use my old iphone 3g as an ipod now that I upgraded to the iphone 4.
    But it has continued to shut down and say that needed to restore it. 
    The last time I did it, it's now saying that I need to have a SIM card in order for it to work. 
    Now, I'm not wanting him to use it as a phone or for texting, so I just assumed this would work.  But it's been very challenging.
    Any thoughts on what I need to do so he can use it as an ipod?
    Thanks!

    Using an iPhone without a wireless service plan

  • Can anyone help me find my old library now that I appear to have deleted it or overwritten it accidentally?  I'm always asked if I want to update when I put in my i-pod and have to do that before I can open my library so I think it was this action.

    Can anyone help me find my old library now that I appear to have deleted it or overwritten it accidentally?  I'm always asked if I want to update when I put in my i-pod and have to do that before I can open my library so I think it was this action that caused me to delete previous library.  Can anyone help?  Apple support have been hopeless as they don't seem to respond to this particular problem but keep giving me answers to finding my purchases which i already know how to do!

    See your other thread...
    tt2

Maybe you are looking for

  • Nohup.log files are not getting generated correctly

    hai, im a weblogic administrator. Here is my problem in weblogic. My partner has complained that nohup.logs are not getting generated properly. Like for every 5 mins a new nohup .log file is getting generated. But almost 4 to 5 logs are of 0 size and

  • Forms 10g W2k

    Can we use Forms10g in W2k with App Server 10g runing on Linux ? . The reason being 10g App server is NOT available for Windows . Thanks

  • Case expression in SQL

    Hello every one, I am trying case it is giving me an error of missing expression, not sure what am i missing. It in the document. http://download-east.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90125/expressions5.htm#1033394 SQL> ed Wrote file

  • Driver for agilent AC source 6811b/6812b

    Hello, we are using Labview 8.0.1 and want to use a 6811b AC source via GPIB. Does anybody have a driver for this source ? Maybe a driver via RS232 would also help, but GPIB is definitly preferred. Remark: drivers for 6812B model might also work due

  • Lion crashes after software update

    Hi to all, Yesterday a had a major incident. My Macbook Pro was updated with a Thunderbolt/networkadapter Update. When restart was performed, the MBP hangs during reboot and nothing happend. I started lion recovery, but nothing happend. The download