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

5
votes
5answers
2k views

Suggest other people's code to study [closed]

What open source Java code would you suggest for me to study? EDIT: I'm interested in the design, simplicity(?), their programming style, logic. EDIT2: The first thing that came to my mind is ...
4
votes
9answers
1k views

The definition of C-based language

What is the definition of C-based language? Is C# considered to be C-based? Is Java considered to be C-based? Furthermore, what does it mean for a language to be based on another language anyway?
3
votes
5answers
6k views

Service layer vs DAO — Why both?

I have been working with SpringMVC, Hibernate, and some databases in a java web application example. There are a few different ones that do this, but this Spring 3 and hibernate integration tutorial ...
3
votes
7answers
737 views

How can I get started on my first non-trivially sized Java project? [closed]

In a month, I have to hand in a Java project. I have to make an e-shop program which has two types of users (admin and normal users). The admin can add/delete/restock stuff in the shop while the ...
0
votes
3answers
621 views

Oracle Java SE Certification [closed]

Which exam(s) should be given for Java certification from Oracle. is Oracle 1Z0-851 exam old SCJP ? Recommend book which covers Oracle 1Z0-851 exam?
18
votes
3answers
11k views

Which is a better practice - helper methods as instance or static?

This question is subjective but I was just curious how most programmers approach this. The sample below is in pseudo-C# but this should apply to Java, C++, and other OOP languages as well. Anyway, ...
18
votes
9answers
737 views

Advantages and Disadvantages of Forced Code Reformat

I'm currently working at a place that may be looking at forcing developers to use an automated code formatter on version control check-in. I'm looking for developers opinions on the advantages and ...
17
votes
8answers
3k views

What is the benefit of switching on Strings in Java 7?

When I was starting to programme in Java, the fact that switch statements didn't take strings frustrated me. Then on using Enums, I realised the benefits that you get with them rather than passing ...
12
votes
2answers
1k views

Query language for JSON

I have a server which is returning very big JSON message and my client application is only dependent on part of this response. Client application needs to check if "xyz" property exist in JSON message ...
12
votes
8answers
888 views

Thinking of simultaneously coding the same project in two languages. Good Idea?

Is this a good way to learn a new language? Or to develop a preference of one language? I was thinking of coding a project in both Python and Java. The only foreseeable problem is trying to transfer ...
10
votes
8answers
10k views

Best practices for constants

How do you guys handle constants, especially in Java (static final) and C++ (define)? Do you use dedicated headers (C++) or classes (Java) for all constants? Do you turn all literal values into ...
10
votes
6answers
3k views

Are Java's public fields just a tragic historical design flaw at this point?

It seems to be Java orthodoxy at this point that one should basically never use public fields for object state. (I don't necessarily agree, but that's not relevant to my question.) Given that, would ...
9
votes
6answers
687 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 ...
9
votes
4answers
625 views

Using “catching exceptions” to improve readability, Good or Bad?

In the section When to Use Exception in The Pragmatic Programmer, the book writes that instead of: retcode = OK; if (socket.read(name) != OK) { retcode = BAD_READ; } else { ...
9
votes
5answers
2k views

What are you thoughts on GWT? [closed]

Since I'm learning Java in this period and I just finished with the tutorials I think I'm ready to start contributing to a project (since I know from experience this is the best way to really learn). ...
9
votes
5answers
487 views

How is the JVM and Java's WORA different from other high level languages?

In the Java world, we often talk about the JVM, and when Java was new it had the supposedly killer feature of "Write Once, Run Anywhere." From the way people talk and write, this seems different from ...
7
votes
1answer
567 views

Multiple Dispatch vs. Function Overloading

I'm trying to understand the difference (if any) between the two. According to the Wikipedia page for Multiple Dispatch it is synonymous with Function Overloading, but then later on goes on to say: ...
7
votes
2answers
2k views

Benefit of using static inner builder class

During the course of writing the code guidelines for a company I found myself recommending using the Builder pattern from Effective Java, instead of telescopic constructors. However, after thinking ...
7
votes
3answers
604 views

How safe it is to do minor JVM upgrades?

I have been working on the JVM for years and I have very rarely experienced a JVM crash ... that is until approx 6 months ago. Since that I have experienced approximately 5 JVM crashes resulting ...
6
votes
3answers
373 views

What complexity do DI frameworks add?

The currently most upvoted answer to a very recent question states that DI containers are an "enterprise software" pattern, used when the object graph is very large and complex. I suspect that 95% ...
6
votes
4answers
3k views

Replacement for instanceof Java?

So I'm fairly new to programming in the real world (outside of academic projects) and have come across lots of posts saying that using instanceof is a bad thing to use to determine what class a ...
6
votes
1answer
790 views

Is Java free software?

Free software as defined by FSF. Are its standard libraries free/open source? Is its implementation free/open source? Which parts of it are not free/open source? Any other relevant information.
6
votes
4answers
2k views

Is JavaBeans a good example of encapsulation?

I'm trying to understand if JavaBeans is a good example of encapsulation. In my view, it's not as usually all the internal state is exposed through getters and setters. A simple example is public ...
6
votes
2answers
2k views

Can Java be considered a managed programming language?

I am curious; can Java be referred to as a managed language? I am mainly thinking about the Microsoft model when it comes to unmanaged versus managed code (say native vc++ to C#). With the ...
6
votes
15answers
2k views

Why OOP is enforced in Java and C#? [closed]

In many other languages like C++ and Javascript, OOP is optional. Procedural code is ok. But in languages like Java and C#, OOP is somewhat enforced. Everything is to be a part of a class or an ...
6
votes
8answers
499 views

Would you still use Java in your next project, despite the whole mess in JCP

It seems that there is a whole mess around current JCP. Quite of number of highly respected guys like Doug Lea, Tim Peierls had quit JCP. Reference : Is JCP dead? and Final results of the JSR ...
6
votes
8answers
3k views

Would Java programmers hire C# programmers? [closed]

I learned and used Java in college. After graduating, I got a job in C#. Two years after, there are a lot more positions in Java. Would I have a good chance to be hired as a Java programmer? What ...
5
votes
1answer
717 views

Places where I can do some voluntary software development/programming work?

I asked this question due to my lack of experience which is a major problem for me when applying for a job because all the companies require 2 to 3 years of programming experience. So I am taking ...
5
votes
3answers
952 views

Tools for managing a complicated project setup with many frameworks and no documentation

We have to extend a huge java project that makes use of frameworks like maven, spring, struts, freemarker and closure templates. We do have access to source code but barely any documentation, and we ...
5
votes
4answers
3k views

Importance of certifications for Java programmer without BS degree? [closed]

I've read some posts here and other places about how a lot of people don't put much value in certifications but I am beginning to think it may be necessary for me at this point to be able to move to a ...
4
votes
3answers
67 views

Returning results of method on batch list?

The title is a bit vague so I'll try to elaborate. I have a function makeFoo(int bar) -> returns Foo or throws Exception. I also have a batch version of this makeFoos(int[] bars) -> ...
4
votes
5answers
463 views

Why is there no deterministic object destruction in Java? [duplicate]

I understand and enjoy the benefits of the Garbage Collection in Java. However I don't understand why there is no way in Java to explicitly (and quickly) destroy an object. Surely this could be useful ...
4
votes
5answers
1k views

When and why would we use immutable pointers?

In Java, the String object is both immutable and also a pointer (aka reference type). I'm sure there are other types/objects which are both immutable and a pointer as well and that this extends ...
4
votes
3answers
3k views

What is good programming practice for structuring java project?

I have a Java project that is getting to be relatively large (a few thousand lines in all, I'd say). It's definitely a lot larger than what I've dealt with before, being that I am still a relatively ...
4
votes
5answers
891 views

Does learning to develop for iOS create a lock-in? [closed]

If I begin my career (first job) with developing on the iOS platform, does that lock me in into iOS and Mac OS X development only? By locking me in I mean will that create barriers for me to switch ...
4
votes
2answers
983 views

How to Get Myself Up to Speed in Building a Java Web App

I'm a new developer at a fairly large company and I'm working on a Java Web Application with a senior developer there. The Web App is built on top of an IBM stack (RAD, DB2, WebSphere) and basically ...
3
votes
3answers
350 views

Why should a builder be an inner class instead in it's own class file?

Many Builder Pattern examples make the Builder an inner class of the object it builds. This makes some sense since it indicates what the Builder builds. However, in static a static type language we ...
3
votes
4answers
4k views

How to run an applet like a desktop application without installing entire JDK?

I want to make a desktop application- an analog-clock with the option of setting alarms using java. For rendering all the graphics and the button features, a Swing applet is the answer. But the ...
3
votes
9answers
2k views

Why is Visual Basic easier to learn than Java for COBOL developers? [closed]

A friend of mine came from a VMS/COBOL background and we gave her some VB6 to do - she absolutely ran with it. Next we ran her through some Java stuff and it didn't click at all. What's similar ...
2
votes
1answer
196 views

GPL - Writing an exception for a plugin interface under section 7 of GPLv3

The problem I've written a application for Android licensed under GPLv3 which needs to use Google Play Services, a proprietary library, as a plugin to the app. Now I'd also like to add libspotify as ...
2
votes
8answers
1k views

Is it necessary for Java programmers to learn some C/System programming?

I've read a blog(in Chinese only) in which the author had jeered at Java programmers who know little about C and system programming. The author illustrated how he had found the deep reason of a Java ...
1
vote
3answers
239 views

Program design with multiple data sets, algorithms and results

I have a question regarding the design of my software. There are four different data sets and three consecutive algorithms operating on the data sets and on the results from the previous algorithm ...
1
vote
5answers
923 views

Transitioning To Java [duplicate]

I'm primarily a VBA/VB3-6/VB.Net developer of 15+ years with several years of C# experience. Myself and another developer (a seasoned senior level java developer) were hired on at this new company at ...
1
vote
5answers
8k views

Java SE and Java EE? [duplicate]

I was now talking with some people and they told me that if i was intrested in a job in the future for Java programming i should not spend too much time only learning Java SE i should spend time ...
1
vote
5answers
734 views

Php: Whats my next step? [closed]

So in college I started learning Php, mostly starting with the Larry Ullman books. I got a job at a company after, where I was able to learn some stuff from the higher up guys. Since then, I've done ...
0
votes
3answers
327 views

Updating Java SE and Java EE knowledge [closed]

I wonder how you guys are updating your tech knowledge on a daily basis. Definitely it will be from internet. But what are those sources? E.g. I didn't know about the DWR technology but knew if from ...
23
votes
4answers
1k views

Why Java doesn't make use of encapsulation with some classes?

My question is related with System.in and System.out classes (there might be others like those in the Standard library). Why is that? Isn't that a bad practice in OOP? Shouldn't it be used like: ...
22
votes
9answers
5k views

Pure Java web browser, is it practical? [closed]

I know that a Java web browser is possible, but is it practical? I've seen the Lobo project and must admit I am impressed, but from what I've gathered it seems that development stopped in 2009. Would ...
18
votes
10answers
5k views

Why is Java considered more portable than other languages like C++?

What differs between "writing a specific JRE for each platform" for Java developers and "writing a C++ compiler for each platform" for C++ ones?
13
votes
2answers
1k views

Does the Decorator Pattern exist in the Java IO classes?

For an assignment, I have to find out which of the Gang of Four design pattern the classes java.io.Reader and its subclasses java.io.PushbackReader, java.io.BufferedReader and java.io.FilterReader ...