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

0
votes
2answers
208 views

Java exam: prebuilt methods? [duplicate]

Possible Duplicate: Is using build-in sorting considered cheating in practice tests? I'm studying for a Java exam at the university. In your opinion, could I use, during the exam, ...
2
votes
6answers
1k views

How quickly does the Java language get outdated? [closed]

I started learning Java recently. I started learning it using books that I picked up from the library, some that I bought, and here and there from Java documentation. The book that I use for Java was ...
7
votes
3answers
619 views

What is the value of workflow tools?

I'm new to Workflow developement, and I don't think I'm really getting the "big picture". Or perhaps to put it differently, these tools don't currently "click" in my head. So it seems that companies ...
3
votes
5answers
708 views

Where does Java get its SOA reputation from?

I see lots of SOA books surrounding Java and have always had the subliminal notion that Java is the "right" language for robust/enterprisey SOA, even though I know what SOA involves and that it is ...
3
votes
2answers
428 views

Is it possible to migrate struts/spring based application to GWT?

I am using the combination of spring, spring-security, struts and iBatis in my application. Now I am looking to migrate the struts UI to GWT. The new combination must be spring, spring-security, GWT ...
3
votes
1answer
2k views

Why the overhead when allocating objects/arrays in Java?

How many bytes an array occupies in Java? Assume It's a 64bit machine and also assume there are N elements in an array, so all these elements would take up 2*N, 4*N or 8*N bytes for different types of ...
7
votes
2answers
9k views

When should I use StringBuilder or StringBuffer?

In a production web application, my fellow programmers used StringBuffer everywhere. Now I am taking care of application development and corrections. After reading StringBuilder and StringBuffer I ...
8
votes
8answers
1k views

How important is it to learn makefiles? [closed]

I work in c++ mostly as a hobby (I'm still in school and therefor don't have a real job). The IDEs generate the makefile for me and so I'm wondering if it's worth learning how to make them myself. By ...
7
votes
4answers
367 views

How would a new language look if it was designed from scratch to be easy to TDD?

With the some most common languages (Java, C#, Java, etc) it sometimes seems that you are working at odds with the language when you want to fully TDD your code. For example, in Java and C# you will ...
8
votes
1answer
522 views

What are the licensing requirements for shipping Java along with application

We have an application in Java. Now we want to export this application to clients (free of charge). Can we ship JRE7 along the application (precaution as client might not have Java installed). Is it ...
9
votes
4answers
2k views

Analyzing Memory Usage: Java vs C++ Negligible?

How does the memory usage of an integer object written in Java compare\contrast with the memory usage of a integer object written in C++? Is the difference negligible? No difference? A big difference? ...
5
votes
2answers
526 views

How much should a floating license cost?

Floating licensing is a software licensing approach in which a limited number of licenses for a software application are shared among a larger number of users over time. Nice for the corporates to ...
47
votes
2answers
17k views

Choosing between Single or multiple projects in a git repository?

In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project: ...
17
votes
5answers
1k views

What are the benefits of prefixing function parameter names with p*?

I often see projects (in Java projects and teams using Eclipse) that prefix function parameters with p. For example public void filter (Result pResult) ... I personally don't see any benefit in ...
2
votes
7answers
596 views

Caching's Effect on Program Performance

How does caching effect the performance of a running program? From my understanding, the assumption that each instruction always takes the same amount of time is not always correct, because of the ...
1
vote
1answer
368 views

Algorithm Analysis: Frequencies of Execution

I am currently reading the Analysis of Algorithms section in Algorithms, 4th Edition and I'm trying to understand how the author calculated (N^2)/2 and (N^3)/6 frequencies of execution in the code ...
9
votes
11answers
8k views

Why is using System.out.println() so bad? [closed]

Of course, it is very good use to use a logging framework for the error messages or warnings. But sometimes I use System.out.println() if I want to try something new in a short time. Is it really so ...
13
votes
6answers
408 views

Expected behavior when an request for a collection will have zero items

Let's say you are given the following... List<Thing> theThings = fubar.Things.All(); If there were nothing to return, what would you expect fubar.Things.All() to return? Edit: Thanks for the ...
2
votes
4answers
713 views

Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?

Can I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority, and is it a good idea? Here's more info: I am about to ...
7
votes
5answers
11k views

Best way to load application settings

A simple way to keep the settings of a Java application is represented by a text file with ".properties" extension containing the identifier of each setting associated with a specific value (this ...
2
votes
3answers
213 views

A place for putting code samples in projects

Every now and then I get or write some minimal code samples to achieve tasks. What's the usual practice for storing these samples (which could prove useful later on) ? Have a separate source folder or ...
-2
votes
6answers
11k views

How to create a cool user interface for an excel file in java or C#? [closed]

I have an excel file with many sheets and relations between theme (ie, formulas that relates sheets to each other). I wanna create the user interface for this excel file.in other words I wanna create ...
2
votes
1answer
712 views

Extend functionallity of a class: inheritance or java's dynamic proxy

Currently I have three classes and respective interfaces and respective builders: Tree: the data structure (implemented in SimpleTree) ProbabilityTree: is a Tree with added functionality to randomly ...
2
votes
1answer
530 views

Why this code create object as interface?

In am reading Spring in Action (3rd edition) and here a snippet from it: ApplicationContext ctx=new ClassPathXmlApplicationContext("springidol.xml"); Performer ...
7
votes
4answers
2k views

Multiple Same Object Instantiation

What exactly happens in Java when you instantiate the same object multiple times? For example: Test test = new Test(); then later on I will call it again, Test test = new Test(); again or inside a ...
0
votes
3answers
3k views

How to create interest in programming? [closed]

I am student of 3rd year software engineering, and I find myself nowhere in field of programming. I know basics of programming languages like C, C++, Java, Visual Basic, HTML, JAVAScript, CSS and ...
2
votes
6answers
1k views

Which version of Java should I use for learning?

I am a QA engineer interested in mobile development and automation.I have basic programming experience (intermediate level Python, C++ programmer) and as most companies choose Java for writing ...
6
votes
8answers
1k views

How to split large, tightly coupled classes?

I have some huge classes of more than 2k lines of code (and growing) that I would like to refactor if possible, to have some more light and clean design. The reason it is so big is mainly because ...
1
vote
2answers
943 views

How can we handle multiple instances of a method through a single class instance

How can we handle multiple instances of a method through a single class instance(Single constructor call)? To elaborate, I have a handler class which has two methods lets say verifyUser(String JSON) ...
3
votes
3answers
2k views

Implementing cache system in Java Web Application [closed]

I worked with JPA (Eclipselink implementation) and Hibernate. As I understand these two have great caching systems. I am interested in caching in a Web application and in order to better understand ...
3
votes
2answers
431 views

Explanation of satellite data from a programmers perspective

I have started reading Part 2 of Introduction to Algorithms and in the section The structure of the data the author/authors says in the context of sorting a sequence of numbers: In practice, the ...
13
votes
4answers
888 views

Is there a different usage rationale for abstract classes/interfaces in C++ and Java

According to Herb Sutter one should prefer abstract interfaces (all pure virtual functions) to abstract classes in C++ to decouple the implementation as far as possible. While I personally find this ...
23
votes
6answers
3k views

How do you encode Algebraic Data Types in a C#- or Java-like language?

There are some problems which are easily solved by Algebraic Data Types, for example a List type can be very succinctly expressed as: data ConsList a = Empty | ConsCell a (ConsList a) consmap f ...
-1
votes
2answers
116 views

Is there a way to input values on a web site's text box using a database table values?

I have a table with username and passwords that I want to input in Hotmail's username and password box. Is there a way to actually program this? Are you allowed to manipulate text boxes of someone ...
2
votes
0answers
271 views

Design thoughts on a schema based request object for CXF endpoint

Trying to seek design suggestion on a schema based request object for a CXF endpoint. I've created a CXF SOAP endpoint which takes the following object as an input. The request object will have ...
4
votes
1answer
403 views

Does current JIT optimize generated machine codes for branch prediction based on runtime statistics?

Some JVMs would compile Java byte code into native machine code. We know that there are lots of optimizations we could apply for that. Recently, I also learn that a branch operation may block the CPU ...
5
votes
3answers
324 views

When, how and why should one upgrade (Java) frameworks?

Short summary as introduction: We are a small Java web development team, creating applications using various frameworks and libraries like JSF, Hibernate, Seam, all together deployed in JBoss AS. ...
5
votes
13answers
861 views

Limitations of Polymorphism in statically typed languages

I program mostly in statically typed languages, like C++ and Java. A common strategy employed in languages like these to handle dealing with collections of objects which are related, but which need ...
0
votes
1answer
341 views

What Exactly is a Model Relative to the ModelAndView Class in Spring

What exactly does the "Model" part mean? Is it the same as the domain model? I've read that it's a map, but I'm having a hard time understanding the concept.
81
votes
11answers
20k views

What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]

A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
4
votes
6answers
3k views

To be an interviewer - Java [closed]

The internet is full of references on how to get prepared for an interview. Many websites are loaded with questions and answers. But I can't find any useful information about what exactly an ...
1
vote
1answer
288 views

How best to enable a web service consumer to integration test a transactional web service?

I want to allow consumers of a web services layer (web services are written in Java) to create automated integration tests to validate that the version of the web services layer that the consumers ...
2
votes
1answer
183 views

Java sql annotations ManyToMany relationships

I was wondering your thoughts on the best way to implement a SQL ManyToMany relationship in Java using annotations - in this case eBeans - where there is extra data associated with the join. I have ...
3
votes
6answers
3k views

How to properly design classes for a big project?

If we need to represent classes in a class diagram for a big project that is not completely designed yet, and the classes have to be actual tables in a database, how would we predict and design the ...
3
votes
2answers
394 views

Why was the Java App store discontinued? [closed]

A Java App Store sounds like a cool idea right? Well, I turned to Google and found some remnants of an app store that Oracle had been developing. It looks like it has since been discontinued, but I ...
14
votes
3answers
3k views

Why null pointer instead of class cast?

In Java: int count = (Integer) null; throws a java.lang.NullPointerException. Why doesn't this throw a Class Cast Exception for ease in programmer understanding? Why was this exception chosen ...
10
votes
6answers
2k views

Should java developers know about garbage collection algorithms?

I have been recently asked in an interview if I know about any garbage collection algorithms. I knew what garbage collection is but I never really thought about learning about garbage collection ...
8
votes
1answer
961 views

Conceptually what does it mean when it is said that each thread gets its own stack?

I have been reading Java Concurrency in Practice by Brian Goetz and inside the section Stack Confinement it is mentioned that each thread gets its own stack and so local variables are intrinsically ...
12
votes
6answers
1k views

Homework for strong C++ developers learning Java

I'm tasked with teaching an accelerated university special topics course in Java for programmers with many years of experience in C/C++. What sort of medium-length (1-2 hours max) assignments would ...
5
votes
1answer
617 views

Java solution for mutual authentication with smart card

I need to develop a Java solution for mutual authentication between Tomcat 6 (server) and SmartCard "IDGo 300" (client). In order to do this I thought of the following scheme: 1.Tomcat (server) send ...