I have a class , it passes objects,primitive . can anyone please explain this     public class TestObj { String name; int age;  public TestObj(String name, int age) {     this.name = name;     this.age = age; }  public String getName() {     return name; }  public void setName(String name) {     this.name = name; }  public int getAge() {     return age; }  public void setAge(int age) {     this.age = age; }  @Override public String toString() {     return "TestObj{" + "name=" + name + ", age=" + age + '}'; }  }   main class    public class Test {  public static void main(String[] args) {     Test t = new Test();      TestObj obj = new TestObj("James", 25);     System.out.println("************* Output ****************");     System.out.println(obj);     t.setName(obj);     t.setAge(obj);     System.out.println(obj);      String a = "Hai Test";     System.out.println("&gt;&gt; :: " + a);     t.setString(a);     System.out.println(":: " + a);      int x = 10;     System.out.println("------- " + x);     t.setInt(x);     System.out.println("------- " + x);  }  public void setInt(int y) {     y = 25; }  public void setString(String x) {     x = "Did i changed my Data";  }  public void setName(TestObj obj1) {     obj1.setName("I got Changed"); }  public void setAge(TestObj obj1) {     obj1.setAge(35); }  }     ************* Output ****************            TestObj{name=James, age=25}            TestObj{name=I got Changed, age=35}            :: Hai Test            :: Hai Test            ------- 10            ------- 10
I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
Activity Monitor in Mavericks "Show Memory Usage" dock icon gone? I just purchased a new MacBook Pro with Mavericks installed and noticed that Activity Monitor doesn't have the "Show Memory Usage" dock icon option anymore.  I really liked this option since I used it to prevent disk swapping by closing applications when I had too many open.  What gives? External hard drive and Recycle Bin behavior When my Seagate external hard drive is plugged in, its $RECYCLE.BIN folder automatically contains all the files contained in the Recycle Bin of the PC. Is it true that actually we don't have any Recycle Bin of external hard drive, rather it is the Recycle Bin of the PC? Why is it so? Manipulating the axis on a ListLinePlot Lightsabers are not made of light, nor have they anything to do with lasers (even if there are people who mistakenly refer to them as "laser swords").   Blaster bolts are also not lasers. They travel significantly slower than light, they travel even slower than ordinary bullets fired by gunpowder. (called slug throwers on the Star Wars universe)  Was there any use of lasers ever presented in the Star Wars universe, either as we use them today, or as weapons?  By laser I mean something which behaves like laser does, even if it's not called by that name in a movie or book. If something is called a laser (in the script or by fans) but clearly doesn't work like a laser (for example, it travels slowly, and in visible blocks) it doesn't count. How can I make Firefox open magnet-links in Transmission? How to check if list item already exist when adding it with Prove that f is one-to-one on D How to set one header for each page using multicols What's the full-form & significance of USS & ISS prefixes in name of Star Trek starships? Floating point comparison If Voldemort's body dies, what process would he use to restore himself from a horcrux? His plans seem sloppy for the pains he had taken. For example, why create horcruxes from pieces of jewellery when they dont have the agency to seek out a new body by themselves?  He needed Quirrel, a person with unlikely ambitions to seek him out to gain an useful body. When that body was gone, he needed Barty Crouch, someone with questionable agency (he could be imprisoned) to transport Harry and draw his blood.  Nagini and the diary seems the only horcruxes with agency, the others are mostly inert.  What plans were ever taken to restore Voldemort from his horcruxes? When true polymorphed creature dies, does it revert to its original form? The  description says:     Creature into Creature.   The transformation lasts for the duration, or until the target drops to 0 hit points or dies. If you concentrate on this spell for the full duration, the transformation lasts until it is dispelled.   Does the second sentence imply the creature won't revert to its normal form, even being killed? (providing the caster were concentrating on the spell for the full duration)  If so, isn't "until the target drops to 0 hit points" enough? Why the "...or dies" addition? A creature can't die having more that 0 hit points, can it? Two independent Poisson process question How important are headings in SEO I have a website that sells music artists posters. Each artists has a page containing a small bio, and a list of posters we are selling representing the artist.  Currently our HTML looks like that  &lt;h1&gt;{Artist name}&lt;/h1&gt; bio &lt;h2&gt;Posters&lt;/h2&gt; &lt;ul&gt;   &lt;li class="poster"&gt;...&lt;/li&gt;   ... &lt;/ul&gt;   We are redesigning this page, and we have a new template that we really like. Problem is that in this new version the &lt;h2&gt;Posters&lt;/h2&gt; does not appear anywhere on the page.  As you might expect, a significant part of our traffic comes from people typing something like : "{Artist name} poster" on Google.  I fear that, by removing the word "poster" from the page, we will reduce our chances of getting these people to come to the site, since Google might down rank us.  I see several options here :   Give Google a slightly altered page that contains the H2 tags. But I think this falls into the "Black Hat SEO" category. And I don't want that. Put the heading. Hide it with CSS. Everyone wins, including accessibility tools which can determine the structure of the page using the "invisible" heading. But I do not know if this is considered a good practice. Forget about the heading, and find other ways to tell Google that we really are about posters. (via keywords, but do they really have the same "weight" as an H2?) Adapt the design to our SEO need, and find a way to put that heading nicely.   Are there webmasters out there that have been facing the same issue, how did you resolve it? I am studying the function and characteristic of an op-amp to build a line-following robot with the schematics below. However, in many tutorials, the way to differentiate an inverting and non-inverting op-amp is by looking at the connection to ground via the inverting or non-inverting terminal.  However, in the schematics, the op-amp is considered to have connections to ground, thus in this case, how do I differentiate it then?  I may have understood the whole concept wrongly. Pls help!    EDIT: Please ignore the switch as it may have been drawn wrongly by the supplier. If $p\equiv1\mod{4}$, then $p=a^{2}+b^{2}$ where a and b are uniquely determined From Ireland,Rosen's Number Theory book, ex.8.12.  Let $p\equiv1\mod{4}$, then we can write $p=a^{2}+b^{2}$, where $a,b\in\mathbb{Z}$. Now, let $a$ be odd and $b$ be even and $a,b&gt;0$. How can we show that $a$ and $b$ are uniquely determined? The hint says to use the fact that $\mathbb{Z[i]}$ is a UFD and $p=a^{2}+b^{2}\implies a+bi$ is prime in $\mathbb{Z[i]}$ Canonical question: One has a Windows 10 installed with display language A, but uses keyboard layout B. What does one need to do, to stop Windows from automatically adding an unwanted keyboard layout from language A to one's system?  My example: I have a Windows 10 in English and I'm using a Slovenian keyboard layout. And this is working just fine, until I run a certain program that Windows ever so intelligently thinks needs an US keyboard layout. Windows adds this unwanted layout automatically, switches to it and doesn't remove it afterwards. The new layout isn't even listed in installed layouts. The only way to remove it after it appears, is to manually add it as a keyboard layout and remove it.  It seems that's a common problem for many people but after many hours of googling, I just couldn't find a good solution for it... It would be perfectly fine with me if I could just completely remove the US keyboard layout from my system, but if I do that, the keyboard stops working in some programs altogether.  Programs that I or other people have this problem with: ICQ, some versions of Microsoft Office (lol), games based on Source engine, some versions of UltraVNC, Adobe CC Suite, and the list goes on. Prove that if a function's average is nondecreasing then the function is nondecreasing. Let $\omega:\mathbb{R}_+\to\mathbb{R}_+$ such that $\omega(0) = 0$ and $\xi(s) = \frac{1}{s}\int\limits_{0}^s \omega(t)dt$ is nondecreasing, i.e., $\forall s,s': s\leq s'$, $\xi(s)\leq \xi(s')$. Show that $\omega(t)$ is nondecreasing a.e., i.e. find a function $w(t)$ such that $w$ is nondecreasing and $\omega = w$ a.e.  I was able to show the reverse implication easily, that if $\omega$ is nondecreasing then $\xi$ is nondecreasing. This way seems more difficult. Double line spacing What is the best way to vertically center the content of a div when the height of the content is variable.  In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup.