Browsing 7239 questions and answers with Jon Skeet
(Only answering the first of your questions as the second seems too broad and/or vague...) Is this really true or is there a way to have dependencies that rely on the full old framework version and the project itself depends on .NET... more 5/18/2015 8:13:11 AM
If you need to access the pass key of a ship and you only have the IShip interface, then IShip should have a getPassKey() method, basically. Even if you could cast to ShipAddress within the method, you shouldn't do so - you should make the... more 5/18/2015 7:47:48 AM
Does it internally manages count of locks like in ReentrantLock ? Yes. From JLS section 17.1 - emphasis mine. The Java programming language provides multiple mechanisms for communicating between threads. The most basic of these... more 5/17/2015 7:55:34 AM
I think you may have misunderstood what BeginConnect does. That doesn't make the connection - it just starts making the connection, asynchronously. So yes, I'm not at all surprised that "step over" immediately steps to the next statement -... more 5/17/2015 7:19:36 AM
I strongly suspect the problem is in how you're compiling. Both ConvertiEuro.java and Valuta.java should be in a directory called finanza, and you should ideally compile from the parent directory, so that all the compiler knows where to... more 5/16/2015 3:47:44 PM
It's just a parameter name, not a keyword. It's the other value you're comparing "this" value to. So suppose you're comparing two people, you might have: Person fred = new Person(...); Person george = new Person(...); int result =... more 5/16/2015 3:08:38 PM
You could just use an anonymous inner class instead - Java 7 doesn't support lambda expressions, but it certainly supports parallel execution. pool.execute(new Runnable() { @Override public void run() { // Code here ... more 5/16/2015 10:55:43 AM
You need to specify the name of the class - not a filename. It needs to be the fully-qualified class name, and it needs to be on the classpath. So after compiling, you'd want something like this (just spread out on multiple lines for... more 5/16/2015 10:52:01 AM
s2 should point to same "learnJava" as its already present in StringConstantPool. Nope - the string pool is only used for constant strings unless you call intern. So the string pool contains "learn", "Java" and "learnJava"... but s1... more 5/15/2015 4:16:14 PM
Well, your code is equivalent to: int count = tvShows.SelectMany(show => show.Seasons) .SelectMany(season => season.Episodes) .Count(); Or you could use Sum to find out how many episodes are... more 5/15/2015 3:49:39 PM