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.

learn more… | top users | synonyms

6
votes
2answers
2k views

What's the difference between a marshaller and a serializer?

...and unmarshalling/deserializing? Wikipedia's explanation leaves me none-the-wiser! I'm a Java programmer, in case the terminology is used differently in different languages.
1
vote
1answer
283 views

Implementing Bulk Update feature and its trade offs

The feature to implement is to allow a user to select items and apply data update in bulk. It is very similar to JIRA's ability to bulk update a list of selected issues. In my case: I iterate over ...
1
vote
1answer
204 views

Synchronously write file

I am implementing a server in C for a course project. The server should serve more than one client simultaneously. The description of the project states that fork() should be used to serve more than ...
9
votes
6answers
805 views

Interpretation of DRY principle

Right now I'm struggling with this concept of DRY (Don't Repeat Yourself) in my coding. I'm creating this function in which I'm fearing it's becoming too complex but I'm trying to follow the DRY ...
10
votes
3answers
6k views

Why is the folder name “bin” used in some frameworks and languages?

I have been learning Java. And still after a prolonged time I don't know why the name of the folder is "bin" where one find all the tools for java? Is there is any logical reason behind that? I have ...
4
votes
3answers
379 views

Testing for object equality by comparing the toString() representations of objects

Following on from this question - how do you explain to someone that this is just crazy!: boolean someMethod(Map<String, Object> context) { Object object = context.get("someProperty") ...
-1
votes
4answers
343 views

Are there any situations where having a “data model” in which all your entities are instances of a Map<String, Object>

Are there any situations where having a "data model" in which all of the entities are instances of a Map<String, Object> would make any sense? How do you explain to someone why having such a ...
8
votes
5answers
3k views

What are the advantages of Ceylon over Java? [closed]

Looking for the recent and powerful upcoming programming languages over net, I came across Ceylon. I dropped in at ceylon-lang.org and it says: Ceylon is deeply influenced by Java. You see, we're ...
6
votes
6answers
846 views

Monopoly game 3D graphical interface [closed]

I have created a Monopoly game with a 2D Graphics in Java for my final exam at college. I feel that the game doesn't look very good and I want to add a 3D Graphics. My problem is that I have never ...
4
votes
3answers
4k views

Heavy use of static methods in a Java EE web application?

Generally I am asking if this is a norm. The application architecture includes spring and the zk framework. I personally can't help but think this introduces a number of problems. I mean...this is a ...
4
votes
2answers
533 views

Manage query strings in JDBC methods

I am trying to find out which is the best practice when organising the PreparedStatement strings in a application which uses JDBC to connect to the database. Usually this is the way I retrieve the ...
3
votes
3answers
562 views

When Business Object fields should not exactly reflect database columns

Main advantage with Hibernate annotations is the fact that a simple POJO (also called a Business Object the most of time) can become persistent through Hibernate annotations (or actually JPA) . In ...
11
votes
8answers
8k views

Do you start migrating your Swing project to JavaFX [closed]

I have a 4 years old project which is written in Swing + SwingX. Currently, it is still alive and still kicking. However, as more GUI related feature requests coming in (For instance, a sortable tree ...
6
votes
3answers
2k views

Why we don't import a package while we use String functions?

I asked myself why we didn't import a package while we use String functions such as toUpperCase()? How they get in there without importing packages?
2
votes
5answers
6k views

Interview prep for coding [closed]

I have an interview for a position and was told that I would have to do some coding test, given a laptop in a specific, by myself, in a specific time-period of 45-60 mins. This is the first time for ...
0
votes
2answers
167 views

Persistent Storage format for (update+read)-intensive data

I am developing a Java application. While using the application, data would be generated that needs to be stored on disk. I am looking for an embedded database appropriate for a average use-case of ...
2
votes
1answer
270 views

How to handle repetitive code dealing with object properties?

Every so often I run into a situation where I need to map a set of properties from one object to another object of a different, unrelated class. The set of properties is large enough to make typing ...
1
vote
2answers
356 views

initial Class design: access modifiers and no-arg constructors

Context: Student working through Class design in personal/side project for Summer. I've never written anything implemented by others or had to maintain code. Trying to maximize encapsulation and ...
1
vote
2answers
636 views

Considering JCR as a NoSQL solution?

I'm evaluating some NoSQL solutions for a project of mine and JCR popped up during my searches as a document store. But it seems somehow of an obscure niche which didn't have the impact its designers ...
3
votes
3answers
544 views

Algorithm which suggests synonyms based on some term?

Is there an algorithm which I can use in order to generate synonyms for some term (word) in respect of a spam. I am writing a simple spam filter. For example, I set that the app must omit a word ...
1
vote
1answer
632 views

Including Module Source files into War file using Maven

My goal is to include modules sources files into War file. I read this explanation on the maven official site: ...
9
votes
5answers
591 views

OOP :What are some of the situations in which class based design is better than interface based one?

I was reading JDOM's website. Why is the JDOM API defined in terms of concrete classes rather than interfaces? Jason Hunter summarizes the arguments against an interface-based API for JDOM: ...
2
votes
2answers
273 views

Replacing dao layer

I am developing a series of webservices (based on spring and spring mvc). For the first time in my dev career I do plan on replacing the dao layer in the future(I have always seen it mentioned but ...
7
votes
4answers
3k views

CSV file generation using Java

We have a requirement in our project to generate a big CSV file every 2 hours using a Java program. This file will have around 60,000 lines (around 120 characters per line). I am not sure about the ...
5
votes
2answers
814 views

Why does the add() method of a Linkedlist return true in Java?

Why does the add method of a Linkedlist return true in Java? http://docs.oracle.com/javase/1.5.0/docs/api/java/util/LinkedList.html#add(E) Why not just make it a void method? I know it says "per the ...
0
votes
2answers
1k views

Do Java, J2EE and Java Web get better with time? It still looks problematic to me after months [closed]

I'm a little new to Java Web Development. JSF, JSP, Servlets, Hibernate etc... I have really a good understanding of OOP and C++. I have years of PHP and MySQL web development experience. I also have ...
8
votes
3answers
417 views

When comparing a combination of String literals, is it convention to call .equals() on the literal? [closed]

There are benefits to each, and I understand the differences - but what is considered best / standard practice? Why? "myString".equals(myStringVar) Avoids a potential NPE and does not require a ...
4
votes
3answers
620 views

In Java, why are nextInt() and nextDouble() instance methods of Random objects?

In Java, why are nextInt() and nextDouble() instance methods of Random objects? I feel that these methods should be static methods of the Random class. What is the purpose of having to instantiate a ...
4
votes
2answers
452 views

Options for programming by contract in Java

I am working on a project (which includes JavaEE web apps and JavaSE apps) that has grown from a single developer to a team of three, and issues of readability and robustness are starting to emerge. ...
0
votes
2answers
793 views

Creating webservices using spring-mvc. One project or multiple projects

Using spring mvc to create a restful api, Maven is build tool and tomcat with spring jars is deployment . Plan A: each webservice will be its own separate war file/project ? if required I would ...
5
votes
3answers
433 views

from software developer to a software teacher career [closed]

I am a software engineer on a large company and I love what I do. However, I feel that on the long run I would like to become a teacher on these subjects, not exactly a classic uni teacher, but more ...
2
votes
2answers
841 views

Web Services as a Back end

I am contemplating a direction to take an application. The application is written in PHP which implements a MVC framework. Some of my clients will require web services. I was thinking even building ...
1
vote
1answer
539 views

Static objects and concurrency in a web application

I'm developing small Java Web Applications on Tomcat server and I'm using MySQL as my database. Up until now I was using a connection singleton for accessing the database but I found out that this ...
5
votes
2answers
458 views

License of current JDK

I am wondering which license the current JDK 7 (NOT the OpenJDK) is using as I know it was once under GNU GPL but with the change of the Distributor License for Java I would like to know whether they ...
1
vote
2answers
187 views

Bad idea to display mail server info in public github project?

I have the project for work that requires me to send e-mails to people using our work mail server. The server doesn't require authentication. Part of my project is using a Java-Helper I'm developing ...
9
votes
3answers
3k views

WCF to Java webservices interop seems surprisingly problematic. Any good resources?

With a recent project our .Net based dev team has been tasked with integrating with a whole host of java based web services around the world, and we really have had a surprisingly (well, we are ...
38
votes
3answers
9k views

What were the “core” API packages of Java 1.0?

Reading about the Google v Oracle case, I came across these questions (apparently from the presiding Judge) ... Is it agreed that the following is true, at least as of 1996? The following ...
0
votes
1answer
273 views

JAAS - What is the required control flag used for?

The Java Authentication and Authorization Service (JAAS) defines that if a login module has the flag "REQUIRED", the authentication should proceed down the login module list on success or failure, and ...
12
votes
5answers
10k views

Why is Python slower than Java but faster than PHP [closed]

I have many times seen various benchmarks that show how a bunch of languages perform on a given task. Always these benchmarks reveal that Python is slower then Java and faster than PHP. And I wonder ...
1
vote
2answers
98 views

Exclusive use of a Jini server during long-running call

I'm trying to use Jini, in a "Masters/Workers" arrangement, but the Worker jobs may be long running. In addition, each worker needs to have exclusive access to a singleton resource on that machine. ...
4
votes
3answers
354 views

How to conduct a 3 days training on current techniques like TDD and CI

I am tasked to conduct a training for an upcoming team of 20 Java developers for a new project. The project owner wants us to use state of the art development techniques like TDD and CI. The ...
5
votes
3answers
576 views

Does the use of Comparator interface breaks encapsulation in Java?

According to the essay "The Object Calisthenics" by Jeff Bay in the book ThoughtWorks Anthology, Use of Getters and Setters should be avoided as they break encapsulation and we should instead ask the ...
8
votes
5answers
4k views

Real world usage of DelayQueue

What would be a real world usage of DelayQueue, what common problem it was designed to solve?
3
votes
1answer
1k views

How to read from a database, and write to a file asynchronously / non blocking way in Java

I'm trying to modify a serial program that reads from a database, and writes results to a file, this is done in a blocking way and I think we can get performance boost of there is a memory buffer and ...
9
votes
6answers
663 views

Is there an infinite amount of knowledge in a programming language?

I can program in Java, C#, C, Scala, and Javascript fluently. I'm comfortable with Objective-C, but I don't remember the conventions used for memory management. I can read Python and Ruby and I've ...
14
votes
10answers
5k views

Understanding already existing complex code base [duplicate]

Possible Duplicate: What is the most effective way to add functionality to unfamiliar, structurally unsound code? Till now, all I have worked on is with Java projects that I build from ...
2
votes
2answers
576 views

MVC: View-Controller Interaction

I have a Java application that I am implementing following the MVC pattern. I want to have a window (view) that contains a form which allows the user to add several text fields. There will also be a ...
5
votes
2answers
496 views

Explaining how the code you wrote works

I was asked to create for a freelance project a Monopoly game in Java. After finishing it the same guy asked me to create four UML diagrams from which he could understand how the game works. ...
26
votes
5answers
2k views

Is use of finally clause for doing work after return bad style/dangerous?

As part of writing an Iterator, I found myself writing the following piece of code (stripping error handling) public T next() { try { return next; } finally { next = ...
-4
votes
4answers
552 views

Are Java developers becoming less important as JVM/JIT capabilities grow? [closed]

(I am asking this from a low latency perspective, but I guess the question applies in normal business domains). I am deciding whether to try and specialise in C++ or Java for low latency. My issue ...