Why a protected method of parent class in one package cannot be accessed using the parent reference in its child class which is in different package. [A.java][[]]1][1]]
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?
80's Animated movie: An old man joins mission to save a boy stranded on a hostile world Earlier today my 2009 iMac emitted I/O errors trying to copy files. So I ran disk utility, verify disk to see if anything was amiss. It was. But as it's my startup disk I couldn't repair it, so I tried safe mode. Safe mode worked the very first time, but when I rebooted it shows the progress bar filling up, before halting. Every time I turn it on now, the same progress bar then crash happens. Booting in verbose mode reveals fsck is failing with signal 8.  Using single-user mode, as that's as far as I'm aware the only way I can get any access to the system, I've been running fsck_hfs. However, it always fails. Below is the output from fsck_hfs -d /dev/disk0s2.  ** /dev/rdisk0s2         Using cacheBlockSize=32K cacheTotalBlock=65536 cacheSize=2097152K. ** Root file system    Executing fsck_hfs (version diskdev_cmds-491.6~3). ** Verifying volume when it is mounted with write access. ** Checking Journaled HFT Plus volume. ** Checking extents overflow file. ** Checking catalog file.    Missing thread record (id = 9931104)    Missing thread record (id = 16434146)    Missing thread record (id = 19370458) disk0s2: I/O error hfs_swap_BTNode: offsets 10 and 11 out of order (0x0000, 0x0000)    Invalid node structure (4, 115897) ** The volume Macintosh HD could not be verified completely.         volume check failed with error 7         volume type is pure HFS+         primary MDB is at block 0 0x00         alternate MDB is at block 0 0x00         primary VHB is at block 2 0x02         alternate VHB is at block 1952491198 0x74622d5e         sector size = 512 0x200         VolumeObject flags = 0x07         total sectors for volume = 1952591200 0x74622d60         total sectors for embedded volume = 0 0x00   I absolutely need to be able to boot to use it as an external monitor. How do trees lift water higher than 10 meters? The atmosphere pressure is 10 meters of water (approx). This means that it is impossible to lift water higher than 10 meters with vacuum or сapillary action (on Earth, under normal conditions).  There are trees higher than 10 meters.  How do they lift water to their tops?  UPDATE  In other words: how cohesion-tension theory can be true if it apparently contradicts the laws of physics?   UPDATE 2  Atmospheric pressure helps to rise the water, not resists rising. What is resisting is water weight. When water column is 10 meters high, then atmospheric pressure can't help anymore.   Any adhesion/cohesion mechanism can't help here too, because it acts only in thin molecular layer. To transfer action force further the pressure is required, which is insufficient at 10 meters.  UPDATE 3  If we had capillary small enough to rise water to 10 meters and then we will build smaller capillary which we expect will rise water higher, we will fail. Water column will break and does not climb higher than 10 meters.     Menisci acts like small piston and can't help rising water higher than 10 meters.  UPDATE 4  Common pressure distribution in capillary is follows:    $P_0$ is atmospheric pressure. As you see, right under menisci, the pressure is lowered by $2 \sigma / R$ where $R$ is the radius of menisci and $\sigma$ is surface tension. The entire term is called "Laplace pressure". As you see, it can't supersede atmospheric pressure, because water continuity will be broken in the case.  I.e. no any menisci can rise water higher than 10 meters.  The existence of higher trees PROVES that there are some other significant mechanisms, not adhesion/cohesion, not capillary.  UPDATE 5  Current version, as I understood it, is based on a declaration, that a water, if put into thin capillary, can behave like a solid body. Particularly, it can resist tension up to minus 15 atmospheres.   This is a tensile strength of concrete, so I don't believe that without additional proofs.  I think it is just not hard to make thin tube, put water into it and check, how high it can climb.  Was it done ever? Expected Number of coin flips for 2 consecutive heads for first time. I was working on problems on expectation and found this one as a question from a well-known exam  Assume that you are flipping a fair coin, i.e. probability of heads or tails is equal. Then the expected number of coin flips required to obtain two consecutive heads for the first time is.  (A)4  (B)3  (C)6  (D)10  (E)5  I worked up like Let N be the number of tosses required untill 2 consecutive heads are obtained for the first time.  Let the probability of obtaining heads be p and tails be q and for a coin p=q=1-p=1-q.  For N=2, the probability will be $p^2$  For N=3, the probability will be $p^2.q$  For N=4, the probability will be $q^2.p^2$  For N=5, the probability will be $q^3.p^2$  and so on...  Now, $E[N]=2(p^2)+3(p^2.q)+4(q^2.p^2)+5(q^3.p^2)+......$  and this comes out to be $\frac{3}{2}$ but it matches with none of the options.  Please tell me where I am wrong and what should I do to reach the correct solution? Prove by induction that $(x+1)^n - nx - 1$ is divisible by $x^2$ Basis step has already been completed. I've started off with the inductive step as just $n=k+1$, trying to involve $f(k)$ into it so that the left over parts can be deducible to be divisible by $x^2$ but getting stuck on this inductive step. Looking for the title of an old sci-fi book, pretty sure it is a Baen or Del Rey imprint. Basically, mankind has reached the stars and expanded throughout the galaxy. Suddenly, an unknown race appears and begins a war of extermination against man. Finally, the galaxy is desolate, and one man remains. He is in a starship with an AI and becomes injured in the battle.  The ship's AI takes over and speeds out into the unknown, followed by the last remaining member of the unknown alien race. As all speeds are at tremendous multiples of the speed of light, the man cannot get away, but the alien cannot catch up.  Finally, communication is opened, at which point the man asks "why?" The alien tells him that man had discovered immortality, but that it required the death of a member of a race known as the Flower People for every human who achieved immortality. The alien says that Man would have found the answer eventually, but that genocide was so intolerable that the aliens came from another dimension, to which they could never return, to stop Man, which resulted in the war of extermination.  Finally, the light speeds become so great that the two remaining living beings in the universe approach the Big Crunch. As the Man begins to dive into the singularity, with the alien hot on his heels, he says that maybe there will be room in the next universe for both races to live in peace, and the final line is "not with a whimper, but with a roar of triumph"! Prove that $B[x] \cap B[x^{-1}]$ is integral over $B$ How do I import a namespace in Razor View Page? It's easy to check that for any natural $n$ $$\frac{n+1}{n}=\cfrac{1}{2-\cfrac{n+2}{n+1}}.$$  Now,   $$1=\frac{1}{2-1}=\frac{1}{2-\cfrac{1}{2-1}}=\frac{1}{2-\cfrac{1}{2-\cfrac{1}{2-1}}}=\cfrac{1}{2-\cfrac{1}{2-\frac{1}{2-\frac{1}{2-1}}}}=\ldots =\cfrac{1}{2-\cfrac{1}{2-\frac{1}{2-\frac{1}{2-\frac{1}{2-\dots}}}}},$$  $$2=\cfrac{1}{2-\cfrac{3}{2}}=\cfrac{1}{2-\cfrac{1}{2-\cfrac{4}{3}}}=\cfrac{1}{2-\cfrac{1}{2-\frac{1}{2-\frac{5}{4}}}}=\cfrac{1}{2-\cfrac{1}{2-\cfrac{1}{2-\frac{1}{2-\frac{6}{5}}}}}=\ldots =\cfrac{1}{2-\frac{1}{2-\frac{1}{2-\frac{1}{2-\frac{1}{2-\ldots}}}}}.$$  Since the right hand sides are the same, hence $1=2$. How to get the Vista taskbar to span multiple monitors? I can't for the life of me get the vista taskbar to span multiple monitors.  I've searched and looked far and wide, and alas the only pseudo-solution i can find is Ultra-Mon, but a) it doesn't quite look the same  and b) i don't want to have to pay for something that Windows really ought to be able to do out of the box.   Does anyone have a solution for this?  Will this get addressed in Windows 7? How can I install Ubuntu 13.04 + without USB, CD, DVD or Net? (hard drive only) I have an older i386 Sony Vaio desktop PC where the BIOS only allows boot from floppy, CD or very specific USB device types, none of which seem to recognize USB flash drives for some reason. Floppy is not an option because the drive no longer works and I have no media for it if it did. I've tried assorted CD and DVD drives, the CD drives all give read errors and DVD drives all say "unsupported emulation".  My next possible option that I would like to try, is to install the hard drive into another machine as a second HD and figure out a way to format it and save an Ubuntu installation to run from that HD once it is moved back into the target machine. IS this possible and if so, how would I go about doing so? The currently running machine uses Windows XP. Show that $\aleph_{\alpha}^{\aleph_{1}} = \aleph_{\alpha}^{\aleph_{0}}\cdot 2^{\aleph_1}$ So basically I want to show:  $\aleph_{\alpha}^{\aleph_{1}} = \aleph_{\alpha}^{\aleph_{0}}\cdot2^{\aleph_1}$ , Where $\omega\leq\alpha&lt;\omega_1$  There is a proof that I found;    But I don't understand his proof for the limit case of $\alpha$.  To be more specific, I dont understand why $ \left( \sup_{\omega \le \beta &lt; \alpha} \aleph_{\beta}\right)^{\aleph_1} \le \left( \prod_{\omega \le \beta &lt; \alpha} \aleph_{\beta}\right)^{\aleph_1}$  Any insights or help is deeply appreciated.  Cheers This is trigonometry from double angles and compound angles. Thus far I've simplified it up to this point. $$2 \sin^2θ – 3\sinθ +1 = 0$$  I'm trying to factorize this to solve for General Solution. I tried taking out a common but that +1 is giving me a problem. I used the quadratic equation to get 1 and 0.5 as an answer, but i don't know how to write it in terms of 2sin(squared)θ and -3sinθ.  Any help will be appreciated. C, C++ and Java IDE for Ubuntu Is there an IDE which can run on Ubuntu that supports C, C++ and Java? I installed , but it only supported Java. I installed the C/C++ package manually, but that package gives an error if I include iostream.   Is there any other IDE which can satisfy my needs? Or can I get NetBeans with all packages pre-installed in it? CSS3 selector to find the 2nd div of the same class I need a CSS selector that can find the 2nd div of 2 that has the same class. I've looked at nth-child() but it's not what I want since I can't see a way to further clarify what class I want. These 2 divs will be siblings in the document if that helps.  My HTML looks something like this:  &lt;div class="foo"&gt;...&lt;/div&gt; &lt;div class="bar"&gt;...&lt;/div&gt; &lt;div class="baz"&gt;...&lt;/div&gt; &lt;div class="bar"&gt;...&lt;/div&gt;   And I want the 2nd div.bar (or the last div.bar would work too). Workflow email with link to document in library Shouldn't the badge requirements scale? Many badges have fixed requirements, such as:   Answer score of 100 or more   However different websites means a different level of difficulty: the more active users a website has, the easier the badge is to get.  On a new and/or low-view website getting this badge may be impossible for several months; on a website like stack overflow now you can obtain it in a day, and it's relatively easy (compared to other SE sites).  Do you think it would be a good idea to implement a formula that allows the required score to scale? The more active users voting, the more votes are required to get it?  If yes how would you handle people who got it for a post that no longer meets the requirements? Give the "some of your recent flags have been declined" banner some room The "some of your recent flags have been declined" message recently got a banner, which makes it stand out  more (which is nice) but it touches the 'Flag' button, which is less nice. Can it have some margin at the bottom (and perhaps less padding?)    Tested in the latest Safari and Firefox on macOS Catalina. Difference between Ubuntu and Linux Mint Can someone please tell me the differences between Ubuntu and Linux Mint ?   I thought they were almost the same thing until I downloaded Ubuntu 13.10 versions of softwares for my Linux mint 16 system, and half of them didn't work. (I did that as those are the links I got when I searched for Linux mint versions) Change array key without changing order