John Losty

Ranch Hand
+ Follow
since Oct 09, 2015
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Losty

No, an uncaught exception terminates the thread it was thrown in, but doesn't terminate other threads.

I thought JVM terminates threads
1 week ago
I am running this:

So that means that even thought exception terminated 1 thread(or did it?) it didnt terminate the JVM. So therefore it cannot be the mechanism to exit the program when something unexpected happens.?

But what is than the mechanism that the JVM uses to exit the program? System.exit() ?
1 week ago
But based on the exception(handled or not) the JVM will terminate or not?  
1 week ago
While working on Mock Exams I stumbled upon this question:

My question is why the nr. 5 is not correct? Can you explain a bit more why nr. 5 is not correct?
1 week ago
@Liutauras Vilda
I am just trying to pass the Z0-808 exam. Your post has been the most applicable for me and will stick to your suggestions.

When I stumble upon some other more difficult examples I will just ask then.

I am still not sure how difficult expressions will we have to evaluate for the exam.
2 weeks ago
I don't understand what he has done.
He didn't said what was applied and how, he just added this line:

The compiler uses precedence and associativity to create the following expression tree: (((a * ((a++) - (--b))) * a) * b)

Than added this:

Then at runtime, order of evaluation is always left to right: ...

also this isn't clear to me as at some point he stopped evaluating from left to right and first evaluated inside brackets.
2 weeks ago

in this case (after respecting parens, precedence, and assoc), requires that the left operand be evaluated before the right operand.

How do you apply it?

A post higher Stephen wrote

T o evaluate an expression, the only important thing is order of evaluation. Precedence and associativity don't have anything to do with expression evaluation.

2 weeks ago
After this

you could go on like that as well?
2 weeks ago
Java Operators and Precedence, Evaluation Order ...

How can I correctly evaluate the following expression?

What should I use first from bellow to correctly evaluate line 7:
Evaluation Order
2 weeks ago
I could see more clearly once that method was renamed.
I think compiler expands Lambda expression into a class in the program bellow.

3 weeks ago
I don't understand completely the program bellow.
In order to understand lambda expressions I am trying to expand it to a class and then pass the instance of the class to the run method in main().
In the comments you can see how that class should look like.
My question is how does the class that is expanded from Lambda expression looks like?

What is confusing to me is that the interface's method has no paramaters. And in the expaned class we are suppose to implement the interface's method.
3 weeks ago
so java.util.Arrays.ArrayList implements List?
3 weeks ago
How can a List be returned? I thought List is an interface.

The reference to a List cannot exist since it cannot be created with
3 weeks ago

I don't understand why the line nr. 9 doesn't compile?

What is the return type of the Arrays.asList() method?
3 weeks ago