public class exerciseFive {      public static void main (String[] args) {         Scanner scanner = new Scanner(System.in);          double finalTax = 0.0;         char taxGroup = 0;         int taxIncome = 0;         int income = 0;         int deduction = 0;         int amount;         do {             System.out.println("Enter next amount: ");             amount = scanner.nextInt();             if (amount &gt; 0) {                 income += amount;             }             else if (amount &lt; 0) {                 deduction -= amount;             }          } while (amount != 0);          System.out.println("Income      = $" + income);         System.out.println("Deductions  = $" + deduction);         System.out.println("Taxable Income  = $" + taxableIncome(income, deduction, taxIncome));         System.out.println("Tax Group   = " + taxGroup(taxIncome, taxGroup));         //System.out.println("Tax Owed  = $" + computeTax(taxGroup, taxIncome, finalTax));     }      public static int taxableIncome (int income, int deduction, int taxIncome) {         taxIncome = income - deduction;         if (taxIncome &lt;= 0) {             taxIncome = 0;         }         return taxIncome;     }   public static char taxGroup (int taxIncome, char taxGroup) {           if (taxIncome &gt;= 500_000) {             taxGroup = 'S';         }         else if (taxIncome &gt;= 200_000 &amp;&amp; taxIncome &lt; 500000) {             taxGroup = 'Q';         }         else if (taxIncome &gt;= 100_000) {             taxGroup = 'M';         }         else if (taxIncome &gt;= 50_000) {             taxGroup = 'A';         }         else if (taxIncome &gt;= 20_000) {             taxGroup = 'R';         }         else {             taxGroup = 'P';         }         return taxGroup;     }     My output:  Income      = $228000 Deductions  = $3450 Taxable Income  = $224550 Tax Group   = P  Correct Output:  Income         = $228000.0 Deductions     = $3450.0 Taxable income = $224550.0 Tax group      = Q   I believe the issue is in this method. I pass the char taxGroup as an argument in the taxGroup method but it is not being updated by the for-loop. I think it may have something to do with the variable being declared in the main method?? Thanks in advance for any help.  As you can see from the output my income, deductions, and taxable income are all correct. The only thing that is wrong is the Tax group.
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?
How do I solve this limit: $\lim _{x \to 0} \left(\frac{ \sin x}{x}\right)^{1/x}$? Why "What's up"? Why's &quot;what's up&quot; used as greeting among young people? It sounds like asking &quot;what is up there&quot;?  A: What's up? B: The sky. Why are tar archive formats switching to xz compression to replace bzip2 and what about gzip? From :  Error propagation It was common to discuss the &quot;error propagation&quot; properties as a selection criterion for a mode of operation. It might be observed, for example, that a one-block error in the transmitted ciphertext would result in a one-block error in the reconstructed plaintext for ECB mode encryption, while in CBC mode such an error would affect two blocks.  I read  similar post before. And I can understand that in CBC decryption, only two blocks are affected due to error propagation (error in 1 block). But, for the same case in CBC encryption, why are still only two blocks affected? It looks like all the following blocks will be affected. Complete references in between the document When we do   \bibliographystyle{style} \bibliography{References.bib}   We get all the references at the end of the document, with some kind of reference/id in the document.   What I need is the complete reference in the document itself (not at the end) and then to be able to write what I want below this reference. For example;  Chaminade, T., Hodgins, J., &amp; Kawato, M. (2007). "Anthropomorphism influences perception of computer-animated characters' actions." Social Cognitive and Affective Neuroscience 2(3): 206-216      - Some text..........      - Some more text.......  Cowley, S. J., Kanda, T. (2005). "Friendly machines: interaction-oriented robots today and tomorrow." Alternation 12(1a): 79-106.      - Some text.....      - Some more text....   How can I do it? Thanks. I have my mobile phone (Samsung Galaxy S2) running on ICS. Recently I activated Microsoft Exchnage ActiveSync to connect to my corporate email. It disabled all the security options like 'Pattern Unlock'. I hated it, and removed my microsoft active exchange account from the phone, but these options are still disabled. How do I get it enabled? Error mounting NTFS partition after hybrid shutdown with Windows 8 I've got this error and I can't access my files located in a different partition when I'm using Ubuntu, but when I'm using Windows 8 my files are accessible. I'm using Ubuntu as my main OS. I tried shutting down Windows 8 properly but still nothing happened. Is there any way where this can be fixed?  Error mounting /dev/sda4 at /media/kris/BackUp Files:  Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" "/media/kris/BackUp Files"' exited with non-zero exit status 14:  The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option. Two column float with [t] using the cas-dc template I am using the cas-dc template for Elsevier. When trying to use \begin{figure*}[t], except I get the error 'The module 'cas/fig' does not have a key called 'cas/fig/t'. Other templates I use work fine. I have included \usepackage{stfloats}. I don't see anything mentioned that strictly forbids it, unless I missed this. Anyone know why? How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure? How to get image size (height & width) using JavaScript? I am planning to visit Moscow this winter as a solo tourist. I am a Hungarian citizen. I booked airplane tickets myself. I was informed that I will need an invitation letter, and I think I will go this way: (), but now the tourist visa application online form asks:    the options are: None, Travel company. I think I will need to select travel company because the description says:     In the case of a tourist visa select "Travel company" from the list and give the name and address of the travel company. In the case of   business visa select "Organization" from the list and enter in the   "Name of organization" name of the host organization, enter the   address of the organization and TIN in the appropriate fields. In   the case of private visa select “Individual” from the list and enter   the name, birth date and home address of the host. In the case of   transit, select "None" from the list.  Reference number: printed on   the bottom line of approval of a foreign tourist "Референс №». It is   necessary to introduce whole number with leading zeros.       Confirmation number: printed on the top line of confirmation of a   foreign tourist. The number can contain only numbers or numbers with   letters. You should only enter the numbers.   However I do not have a travel company.   What do I do?   Select "None" from the drop down so that I don't have to fill in travel company(this seems to be against the description that says select travel company for tourist visa) Select Travel company and the Invitation letter company will be my travel company and they will provide appropriate details? as in () Apply at some additional travel company, because there is no other way?  Some other option?   I didn't expect the visa application to be this complicated. I hope I get there. How do I jump to the next or previous word with CTRL + arrow keys in a console? In terminal emulation applications, pressing CTRL + Left / Right arrows jumps from one word to the previous or next one. Is it possible to have the same functionality in a Linux console, whether it is in text or in framebuffer modes?  In my configuration, the CTRL + arrow keys are transformed into escaped character sequences and not interpreted. Change Folder Permissions I started off with changing to the folder I want to change permissions for, and that is the opt folder.  $ cd /opt/ test@testVM:/opt$   So I tried changing the permissions for this folder now using:  sudo chmod 775   And that hasn't worked. It showed this message:  Try 'chmod --help' for more information.   There is something I am forgetting or leaving out.  Please can you show me what I am doing wrong?  Thanks in advance. Install apt package in ubuntu 12.04 I have mistakenly removed the default package APT from my system .  When I run command locate apt-get, I get below output:  /home/jeet/apt-get /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/cmdline/apt-get.cc /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/apt-get.8.xml /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/de/apt-get.de.8 /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/fr/apt-get.fr.8 /home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/ja/apt-get.ja.8 /home/jeet/Downloads/apt-get /home/jeet/Downloads/apt-get.8.gz /usr/share/bash-completion/completions/apt-get /usr/share/bash-completion/completions/slapt-get   If I run ls | grep apt-get, then I won't get any output.  Can anybody please advice how to recover apt package or install it from start? Reading order for Cosmere series by Brandon Sanderson My entry into Brandon Sanderson's works is Mistborn Trilogy, I finished and loved it. Then I got to know that many of his series are connected and happen in the same universe - Cosmere. Next I started with the Way of Kings, but am now kind of worried if I might read the series in the wrong order. So what is the right order to read them? is it the publication order..?   Elantris (2005)  Mistborn Trilogy Warbreaker (2009) The Stormlight Archive: The Way of Kings (2010) Mistborn: The Alloy of Law (2011) The Emperor's Soul (2012, novella) Shadows for Silence in the Forests of Hell (2013, short story published in Dangerous Women) The Stormlight Archive: Words of Radiance (2014)    or I have seen people suggest the following order too,   Mistborn Trilogy Elantris and the Emperor's Soul The Way of Kings Warbreaker Words of Radiance The Alloy of Law Shadows of Self   I have also read posts where they say it doesn't matter which order you read it in. So am confused, since I have already started the Way Of Kings (Only a few chapters in), should I stop it and go back to Elantris, and follow an order, or should I just continue finish this and pick other books in an order. Last Logon Time of All Users - RDP server not on a domain I am attempting to get a list of "last logon time" of "all users" on Windows Server 2012, but currently only know of how to list a single user login, which is:  net user username | findstr /B /C:"Last logon"  Any ideas?  *P.S. This servers only purpose is to host the RDP connections; not tied to a domain/AD. Preloading images with jQuery I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important.  I saw this here ():  function complexLoad(config, fileNames) {   for (var x = 0; x &lt; fileNames.length; x++) {     $("&lt;img&gt;").attr({       id: fileNames[x],       src: config.imgDir + fileNames[x] + config.imgFormat,       title: "The " + fileNames[x] + " nebula"     }).appendTo("#" + config.imgContainer).css({ display: "none" });   } };   But, it looks a bit over-the-top for what I want!  I know there are jQuery plugins out there that do this but they all seem a bit big (in size); I just need a quick, easy and short way of preloading images! Finding $\int_0^\infty \frac{\cos(ax)-\cos(bx)}{x}dx$ I am practicing calculus section of GRE Math Subject test, and I can't figure out a way to do the following integral: $$\int_0^\infty \frac{\cos (ax) - \cos (bx)}{x}dx.$$  I absolutely have no clue how to do this. Can someone show me the solution explicitly? Thank you. How can I dual boot Windows and Ubuntu? I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions? Helping someone climb I know this is kinda stupid but what is the word for "helping someone climb by allowing him to stand on your hands" (to allow him/her see above some wall or climb something)?