The code snap is like below:    public static void main(String[] args) {     System.out.println(echo("jjj")); }  public static String echo(String str) {     try {         int a = 1/0;     } catch (Exception e) {         throw e;     } finally {         return str;     } }   Why can I get the output and no exception occurs? And if I put the return clause out of finally, then exception occurs. How could return(in finally) stop exception?
I was surprised recently to find that it's possible to have a return statement in a finally block in Java.  It seems like lots of people think it's a bad thing to do as described in ''. Scratching a little deeper, I also found '' which shows some pretty horrible examples of other types of flow control in finally blocks.  So, my question is, can anyone give me an example where a return statement (or other flow control) in a finally block produces better / more readable code?
SOQL result ordering in the absence of an Order By clause In the absence of an  in a SOQL query, what order will Salesforce return results in?  Clearly if ordering is important then Order By should be specified, but I recently encountered a question about what the order would be if it was undefined.  My initial thoughts were Salesforce would return them in whatever order suited them. Much like .  For simple queries this would typically line up with the creation date descending and the Id ascending. For more complex queries it would depend on the joins being performed. Show the expected number of packets to buy to collect a whole set of minifigures I'd like to find the files in the current directory that contain the text "chrome".  $ find . -exec grep chrome find: missing argument to `-exec'   What am I doing wrong? I would like to replace the search submit button with a Font Awesome character like the Magnifier (Search Icon) character, and put Search the site inside the search box.  How can I achieve something like this? Install brother dcp195c, receiving data but nothing happens, why? Can someone please help me to install brother dcp195c drivers on Ubuntu v12?  Using the default driver, the printer says that it is receiving data but nothing happens. $$\lim _{x\rightarrow 5}\frac{x^2-25}{x-5}  = \lim_{x\rightarrow 5} (x+5)$$  I understand that to evaluate a limit that has a zero ("hole") in the denominator we have to factor and cancel terms, and that the original limit is equal to the new and simplified limit. I understand how to do this procedurally, but I'd like to know why this works. I've only been told the methodology of expanding the $x^2-25$ into $(x-5)(x+5)$, but I don't just want to understand the methodology which my teacher tells me to "just memorize", I really want to know what's going on. I've read about factoring in abstract algebra, and about irreducible polynomials (just an example...), and I'd like to get a bigger picture of the abstract algebra in order to see why we factor the limit and why the simplified is equal to the original if it's missing the $(x-5)$, which has been cancelled. I don't want to just memorize things, I would really like to understand, but I've been told that this is "just how we do it" and that I should "practice to just memorize the procedure." I really want to understand this in abstract algebra terms, please elaborate. Thank you very much. I want to know is there a way to render Shadows only in Blender's new EEVEE Render Engine. I want my objects in a separate collection and a ground plane on a separate collection(to receive shadows from the objects collection).I want to render the shadows only and not the objects. According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals &lt; 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) &lt; number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead. How to receive sms from our android app? How should I punctuate around quotes where the punctuation required by the quote interferes with the punctuation of the sentence? The American convention in quotations is (typically) to place punctuation inside quoted text. But I always run into situations where the punctuation of the quote interferes with the punctuation of the sentence. How would you punctuate this (American, non technical)?     When my friends ask, "What do you want for your birthday?", I never know how to respond.   It seems odd to place the last comma outside the quote simply because of the question mark. Is that the preferred (i.e. most often accepted) standard? Display the full URL of the home page? Is it possible to display the full, absolute URL of the home page in Drupal 7, like  www.example.com/The-best-example-possible ?  I'd like to display the full URL of the home page, not just the hostname. Why quantum mechanics? Imagine you're teaching a first course on quantum mechanics in which your students are well-versed in classical mechanics, but have never seen any quantum before.  How would you motivate the subject and convince your students that in fact classical mechanics cannot explain the real world and that quantum mechanics, given your knowledge of classical mechanics, is the most obvious alternative to try?  If you sit down and think about it, the idea that the state of a system, instead of being specified by the finitely many particles' position and momentum, is now described by an element of some abstract (rigged) Hilbert space and that the observables correspond to self-adjoint operators on the space of states is not at all obvious.  Why should this be the case, or at least, why might we expect this to be the case?   Then there is the issue of measurement which is even more difficult to motivate.  In the usual formulation of quantum mechanics, we assume that, given a state $|\psi \rangle$ and an observable $A$, the probability of measuring a value between $a$ and $a+da$ is given by $|\langle a|\psi \rangle |^2da$ (and furthermore, if $a$ is not an eigenvalue of $A$, then the probability of measuring a value in this interval is $0$).  How would you convince your students that this had to be the case?  I have thought about this question of motivation for a couple of years now, and so far, the only answers I've come up with are incomplete, not entirely satisfactory, and seem to be much more non-trivial than I feel they should be.  So, what do you guys think?  Can you motivate the usual formulation of quantum mechanics using only classical mechanics and minimal appeal to experimental results?  Note that, at some point, you will have to make reference to experiment.  After all, this is the reason why we needed to develop quantum mechanics.  In principle, we could just say "The Born Rule is true because its experimentally verified.", but I find this particularly unsatisfying.  I think we can do better.  Thus, I would ask that when you do invoke the results of an experiment, you do so to only justify fundamental truths, by which I mean something that can not itself just be explained in terms of more theory.  You might say that my conjecture is that the Born Rule is not a fundamental truth in this sense, but can instead be explained by more fundamental theory, which itself is justified via experiment.  Edit:  To clarify, I will try to make use of a much simpler example.  In an ideal gas, if you fix the volume, then the temperature is proportional to pressure.  So we may ask "Why?".  You could say "Well, because experiment.", or alternatively you could say "It is a trivial corollary of the ideal gas law.".  If you choose the latter, you can then ask why that is true.  Once again, you can just say "Because experiment." or you could try to prove it using more fundamental physical truths (using the kinetic theory of gases, for example).  The objective, then, is to come up with the most fundamental physical truths, prove everything else we know in terms of those, and then verify the fundamental physical truths via experiment.  And in this particular case, the objective is to do this with quantum mechanics. I wonder whether it is possible to draw the three following quadric surfaces (cone, hyperboloids)  x^2+y^2-z^2=0  x^2+y^2-z^2=1  x^2+y^2-z^2=-1  (and the axis)   using pgfplots 3d or TikZ as it is done in the following image QGIS locked into fullscreen mode on Ubuntu 12.04 How fast does electricity flow? How to maximize any of the views in quad view? I am new to blender. Pressing &#9096; Ctrl&#9095; AltQ opens the quad view. How to maximize any one of the four views of the quad view? `du -sh` reports different used size than `df -h` Possible Duplicates:             df -h says that I have 494G used on /var:  Filesystem            Size  Used Avail Use% Mounted on /dev/sda3             564G  494G   41G  93% /var   But du -sh /var says it's 350G  What makes them different? What is the easiest way to parse an INI File in C++? I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually? Parse XML with Namespace using SimpleXML Why is a Hyperplane called a "Hyper"plane? I just had this curious question. In other fields, the word "hyper" is actually used to refer to something which is "over; beyond; above" as defined by Google. An example of such terms would be Hyperglycaemia, defined by Wikipedia as:     a condition in which an excessive amount of glucose circulates in the blood plasma.   Or Hypersonic, defined by Google as:     relating to speeds of more than five times the speed of sound.   So, my question is, what would be the motive to give a Hyperplane such a name when it is defined as :     a subspace of one dimension less than its ambient space