How is this Possible? Please SEE

Hi
Why is the output of this being shown as 0?
Sudnt this be shown as 10?
public class AQuestion
         private int i = giveMeJ();
         private int j = 10;
         private int giveMeJ()
              return j;
         public static void main(String args[])
              System.out.println((new AQuestion()).i);
}

Because if you follow the execution path, j is null when you call giveMeJ(). After you called giveMeJ(), j is set to 10, but that's too late for your system out. Here's the 10 soltuion:
public class AQuestion {
         private int j = 10;
          private int i = giveMeJ();
          private int giveMeJ()          {
               return j;      
public static void main(String args[])          { 
             System.out.println((new AQuestion()).i);       

Similar Messages

  • I want to buy a Ipod Nano 16gb and it says it holds up to 4,000 songs, and 16 hours of video but on my Itunes I have 2,593 songs and it says I have 19.88 gb. How is this possible?

    I want to buy a Ipod Nano 16gb that says it holds up to 4,000 songs, 16 hours of video, and 14,000 pictures. On my Itunes Library, I have 2,593 songs and it says I have 19.88 gb just of songs. How is this possible? If I buy the Nano, will I not be able to have all my songs on the ipod? The music is my first and only prioarity. I want to be able to have up to at least 3,000 songs, even if that means not having video or pictures. Can someone please help me?

    Daniella04 wrote:
    I want to buy a Ipod Nano 16gb that says it holds up to 4,000 songs, 16 hours of video, and 14,000 pictures. On my Itunes Library, I have 2,593 songs and it says I have 19.88 gb just of songs. How is this possible? If I buy the Nano, will I not be able to have all my songs on the ipod? The music is my first and only prioarity. I want to be able to have up to at least 3,000 songs, even if that means not having video or pictures. Can someone please help me?
    Daniella,
    The estimated song capacities, such as 4000 songs in 16 GB, are based on 4 minute songs of 4 MB each, which is what you get at 128 encoding. 
    Most of us nowadays use well above 128.  (For example, the iTunes Store and Amazon MP3 both sell songs only in 256.)
    However, you can still make more songs fit!  When you sync your iPod, use the option to "convert higher bit rate songs," as pictured.  Choose 128.  This fits more on the iPod, but does not change the songs in your library.

  • My iphone 6 turned off while i was using face time and it returns with the screen saying Hello mean its reset automatically how is this possible ? Now it requires an id and password to activate which i do not remember need help ?

    My iphone 6 turned off while i was using face time and it returns with the screen saying Hello mean its reset automatically how is this possible ? Now it requires an id and password to activate which i do not remember need help ? but i do remember the id and password which i was using on itunes and Apple store. please i almoost buy it in 890$ so it will be a big lost please help me.

    shahzadfromlahore wrote:
    Now it requires an id and password to activate which i do not remember need help ? but i do remember the id and password which i was using on itunes and Apple store. please i almoost buy it in 890$ so it will be a big lost please help me
    Who set up the phone? Who's Apple ID was used to activate it?

  • Snooped at work -How is this possible?

    The other day at work I discussed my boss has the capability to monitor what I am doing on the internet on my macbook. It is my computer but I use his internet. He does not know my password and I have my security settings set to NO FILESHARING. How is this possible and how do I make it stop?

    Short answer, as long as your data passes through any device owned/controlled by someone else, that someone else has the potential to view your data.
    Read that statement carefully. It doesn't matter whether the 'device' is a firewall in your office controlled by your boss (or by a network admin), or a router at your ISP controlled by your ISP's network folks, or even the wire run into your building and maintained by your local telco. Whoever controls the device has the potential to view the data running through it.
    Now, of course, telcos and ISPs aren't supposed to snoop on your traffic - at least without a court order (can anyone say 'warrantless wiretaps'?), but the possibility remains.
    One partial solution is to encrypt all your communications (e.g. HTTPS vs. HTTP, SSL vs telnet, etc.) and that may help hide the content of your communication but whoever's watching can still determine where you're going (e.g. they can see you're hitting https://your.favoritepr0n.com/ but not necessarily see the.. umm.. artwork), and that may be enough to get you disciplined.
    So the short answer, either don't do things you shouldn't, or find a better boss.

  • The disk containing your iPhoto library is running low on space.How is this possible? I have no photos and have never used iphoto and the program is up to date.

    How is this possible? I have no photos and have never used iphoto and the program is up to date. I try to import and drop my pictues into iphoto but nothing happens or I get above statement. Help please!

    Then it's a bogus message and indicates that the default library is damaged.
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library' and use that one.
    Regards
    TD

  • Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?

    Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?

    If you just installed iCloud does that mean you updated the iOS that's running on your iPad?  If so, you'll want to restore all the programs you have from the backup you hopefully made.
    Refer to these articles for help.
    iTunes: Backing up, updating, and restoring iOS software.
    If you don't want to use iCloud, simply don't activate it.
    You can also download the programs again.
    If you live in a country that supports re-downloading apps then you can re-download them.  You can refer to this article for more help.
    Downloading past purchases from the App Store and iTunes Store
    What to know if your country supports downloading past purchases?
    iTunes in the Cloud Availability

  • I just bought my macbook pro and it's charged up to 100% and is still plugged in but now shows the battery at 98%.  How is this possible when it's plugged in to the charger and the green light is on?

    I just bought my macbook pro and it's charged up to 100% and is still plugged in but now shows the battery at 98%.  How is this possible when it's plugged in to the charger and the green light is on?

    The system regularly lets the battery drop to about 95% when on the charger, then recharges to 100%.  This lets the batery exercise "just a little" all of the time and saves the recharge curcuits from overuse.
    Regualr occurence for me.
    Also ... you need to let your battery work at least once per month.  Let it run down to 40%, but not less if you can at all avoid it.  Running thr battery fully dead will shorten the battery life significantly.

  • When i send a text message with my new iphone 5 to my wife who is now using my old Iphone 4 we both receive the message. How is this possible? Also she receives all text messages sent to me

    when i send a text message with my new iphone 5 to my wife who is now using my old Iphone 4 we both receive the message. How is this possible? Also she receives all text messages sent to me. She obviously has a different phone number and a different provider

    See here to create a new apple ID
    http://support.apple.com/kb/HE37
    good luck

  • I have an ipad and iphone sharing icloud.  The ipad is using 268mb, the iphone 2.6.  My plan is 5gb but it keeps saying I don't have enough space to back them up.  How is this possible?

    I have an ipad and iphone sharing icloud.  The ipad is using 268mb, the iphone 2.6.  My plan is 5gb but it keeps saying I don't have enough space to back them up.  How is this possible?

    Hey sameyrs2,
    Thanks for the question. Based on what you stated, it seems like you are getting a message when trying to backup to iCloud. I would recommend that you read these articles, they may be helpful in troubleshooting your issue.
    iCloud: Understanding Backup alert messages
    Manage your iCloud storage
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • Lost Mode and Play Sound are "Pending."  However, iCloud indicates that it connected and backed up to iCloud at a date that is 1 week after it went missing.  How is this possible without locking (Lost Mode Pending an internet connection)

    Hi,
    My wife lost her iPhone two weeks ago while on vacation in London (cell service inoperative in foreign country).  Using Find My iPhone app on my device, I activated Lost Mode and Play Sound.  However, both are listed as "Pending," since it those actions require the phone to connect to the internet (wifi only due to no cellular data coverage.).
    We recently returned home and purchased a new iPhone.
    However, when looking to restore the apps/settings from her old phone using a previous iCloud backup, iCloud indicates that the old phone connected to iCloud and backed up the original phone at a date that is 1 week after it went missing.  How is this possible without locking (Lost Mode Pending an internet connection)?
    If the phone was activated and connected to the internet via a wifi signal, shouldn't it immedately lock, show up on the map, Play Sound, and send me an email that the phone has been found?
    I also read somewhere that if running iOS 7, the iCloud website interface enables you to track previous locations, for instance if the phone moves from wifi hotspot to hotspot.  Is that true?  If so, how do I do that?
    Thank you for your time, and have a great day!
    Sincerely,
    - Matt

    just giving this a wee bump as time is of the essence here and i need advice/ answers quick!
    apologies if i've broke any rules!
    alex

  • I do have wifi connection but no internet, how is this possible? I logged in to the internet at my friends place and when I got home my own internet was not working anymore

    I do have wifi connection but no internet, how is this possible? I logged in to the internet at my friends place and when I got home my own internet was not working anymore

    This is possible to be connected to WiFi but not internet.
    You connect to your modem/router via WiFi and whether it is connected to the internet or configured properly to route the internet to WiFi devices is a different story.
    Now if you've already reset your WiFi (try disabling and enabling) and perhaps even restarting your MBP
    Then make sure that your modem/router is connected to the internet.
    You can try any other device, lights on the modem/router or use Eth cable to test.
    Report back your findings.

  • I am trying to copy and paste a 734mb film on to an 8GB usb but it keeps saying "It cannot copy as there isn't enough space". How is this possible? And how do I put the film on the usb?

    I am trying to copy and paste a 734mb film on to an 8GB usb but it keeps saying "It cannot copy as there isn't enough space". How is this possible? And how do I put the film on the usb?

    Look at the USB stick in Disk Utility and check whether it may be partitioned or have other software on it taking up space.

  • Strange things showing up in navigation addresses and say they are from an ex. How is this possible?

    strange things keep showing up in navigation( short notes from ex) and instead of current location it has his name. How is this possible?

    Did you check your trash? If you dont empty it it will fill up and cause your HD to fill up even though you think you have removed some stuff.
    You should get a small program called "whatsize". Do a google and download it.
    Running it will show you what is filling up your HD and I believe that you can remove files with whatsize.
    good luck,
    frank

  • Would like each new site / link to open in tab as default. is this possible please?

    I would like each new web site or link to open in a new tag as default rather than right click and 'open in new tab'. is this possible please?

    No built-in function to '''''automatically''''' do that, but you can:
    *right-click link or bookmark and choose Open in New Tab
    *middle-click link or bookmark (middle-click = press the mouse scroll wheel
    *CTRL+left click link or bookmark
    NOTE: Options => Tabs => 'open new windows in a new tab' works only '''''when coding on a web page''''' would otherwise open a link in a new window.
    Add-ons (set options after install: Add-ons > Extensions, click Add-on by name, click Options):
    *https://addons.mozilla.org/en-US/firefox/addon/tab-utilities-lite/
    *https://addons.mozilla.org/en-US/firefox/addon/tab-utilities/
    *https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • HT4203 I have turned off the Data use on the I-phone 4s but am told by AT&T that data is still being used for applications.  How is this possible. Can someone help me understand this.  Thanks.

    I have turned off the Data use on the I-phone 4s but am told by AT&T that data is still being used for applications.  How is this possible. Can someone help me understand this. 

    I assume you are including the STIX font as part of your epub files?     
    Perhaps the folks who do this blog might be able to help -- they have done some work with font embedding:
    http://www.pigsgourdsandwikis.com/2011/04/embedding-fonts-in-epub-ipad-iphone-an d.html

  • Time Machine shows a backup this morning at 11:58 but I didn't have the external hard drive plugged in. How is this possible?

    Time Machine shows a backup this morning at 11:58 but I didn't have the external hard drive plugged in. How is this possible?

    Because the drive was disconnected Time Machine made a local snapshot on your Mac.

Maybe you are looking for

  • Unable to read DVDs (to ISO images) in k3b

    k3b is working flawlessly except when I want to read existing DVDs into ISO images. I use the "Copy DVD" option with "Only create image" checked. The read never even starts. Here is the output from k3b's log: System K3b Version: 1.0.1 KDE Version: 3.

  • Automatic download and install of app updates

    Is there a way of setting iTunes to download and install updates to existing apps. At the moment, if I am travelling, I come back and there are 20 or 30 apps to update

  • Content By Search Web Part and the Hover Panel

    Hi  I have an Office 365 E3 account. I have a Content By Search Webpart which I have added to a home page. I have a display template that displays the results and should show the Search hover panel just like in SharePoint Search Results. However, it

  • Mds: (Warning) DiskStore: Failed messaging flag writer

    I reinstalled Mavericks and imported my user from a Time Machine backup from another Mavericks system. I noticed the following lines: 07/12/13 02:40:19,160 mds[92]: (Warning) DiskStore: Failed messaging flag writer 07/12/13 02:40:29,149 mds[92]: (War

  • HTTP BC Timeout

    Hi, Does anyone know if it's possible to set a Connect and Socket timeout on the HTTP BC when it acts as a client? If the HTTP BC calls a backend service that is taking very long to respond, then without a timeout in place, all the BC threads would e