Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.
104
votes
5
answers
50k
views
Why doesn't Java have optimization for tail-recursion at all?
Why doesn't Java have any support at all for tail-recursion?
I am not sure if there is any difficulty here at all. … by the JVM, since the JVM spec can be changed by the same people who design Java. …
13
votes
1
answer
5k
views
How does sorting with java 8 stream work under the hood?
In other words, how Java 8 Stream does sort under the hood? …
1
vote
Interview Question - Adding Method to interface that has been implemented by thousands of class
Make the old interface deprecated
When there is a major overhaul, a new package will most likely be added in (think about the overhaul when Java JDK introduces the new mechanism for file and IO in nio) …
4
votes
2
answers
3k
views
Do wildcards in Java generics restrict or increase flexibility?
The question is very simple: Do wilcards in Java generics increase flexibility?
My understand is "No". Wildcards in Java generics (wilcards) actually decrease flexibility. … Is it therefore true that wildcards in Java actually decrease flexibility? If not, how is my reasoning flawed? …
3
votes
3
answers
2k
views
Overriding equals() method in Java
Short question: Why does Java allow overriding equals(), why is it not final?
I am reading Effective Java 2nd edition by Joshua Bloch. … Java makes it possible so Java allows overriding equals() for a reason. …
3
votes
1
answer
2k
views
How to design extension mechanism for java app
I have an application where I have a set of core features.
The application itself HAS to work in core only mode.
I would also want to make the application extensible such that, when certain jar/plug …
0
votes
Nested maps vs. combined keys
Both options are not good in my opinion.
Say what if the business logic changes again so that you have another subtype?
What I suggest you do is the following:
Use a surrogate key for a table call …
12
votes
Programming for future use of interfaces
From a software engineering perspective, I believe the proper solution for this kind of problems is in the builder pattern. This is definitely a link from 'guru' authors for your colleague http://en.w …
8
votes
2
answers
7k
views
Understanding JAVA generic keyword 'super'
Recently some people said that I was wrong when I explained why one cannot insert a Number object into a list declared as List<? super RationalNumber>.
(This assumes that RationalNumber is a subclass …
1
vote
In Java, what are some good ways to separate APIs from implementation of entire projects?
From what I understand people often use the factory pattern for this.
They put the API interfaces into separate module (say a jar file), and then when the clients want to use the API and has access t …
2
votes
How bad is it calling println() often than concatenating strings together and calling it once?
I don't think having a bunch of printlns is a design issue at all. The way I see it is that this can clearly be done with static code analyzer if it is really a problem.
But it is not a problem becau …
0
votes
calculate complexity of LinkedHashSet
For hashing operations like the contains() you have above, the worst case complexity is big O of n. This happens when there are n instances with the same hash value and the hashing implementation is c …
0
votes
I don't know how to understand the Wildcard type in Java
super Manager>
the read methods in Pair<> returns generic java Object (ie not type safe for read, the compiler kind of discourages reading in this case)
I think seeing it as read and write like this …
1
vote
Accepted
Sortable listview using SQLite
From what you have given here, I would make a few addition assumptions and then propose a solution.
You have a set of entities which you can uniquely identify
You care about the order (in the list) …
0
votes
Is there a more intelligent way to do this besides a long chain of if statements or switch?
What I would do is this:
Group the commands you have into groups. (you have at least 20 right now)
At first level, categorize by group, so you have user name related command, song commands, count co …