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 | |
Results tagged with java
Search options not deleted user 9852
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.
1 vote
Accepted
What Java data structure/design pattern best models this object, considering it would perfor...
public class Map { private Hashmap<String, City> cities; public Distance getDistance(CityA,CityB) // Returns distance between two cities public List<City> getCitiesInRadius(CityA, Distance …
0 votes
Implementing cache system in Java Web Application
If you're attempting to cache static web pages, then using nginx or Apache is the way to go. They'll server those files up faster then tomcat or jetty. Pages you generate once per startup, you shoul …
2 votes
Best practice with respect to anonymous classes in UI applications
The only pattern I've seen, that works is "When the code gets to hard to figure out what's going on, it's time to stop using an anonymous class.". In your example, the method body is the anonymous cl …
1 vote
How can I write complex validation and business logic that can be reused in both direct data...
I design my models so they don't easily get themselves into an invalid state to begin with. Then when my Interface (UI, or service), attempts to put it into such a state, an error is thrown which I c …
7 votes
Return values for CRUD methods?
On create, I usually return the ID of the entity I just created. On an update, I return the object I just updated. Delete I usually don't return anything. In the case of create, the most interestin …