Questions tagged [java]

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.

Filter by
Sorted by
Tagged with
7
votes
5answers
3k views

Where did Java go wrong on the client? [closed]

Not talking about the recent Java/Oracle debacle here, but something I've been wondering recently. When I first started programming, Java was the big thing client-side, however these days you hardly ...
2
votes
4answers
385 views

Should I continue learning a language if in the meanwhile I became interested in another language/platform? [closed]

I started learning Java a couple of months ago. I also wanted to become more exposed to linux so I installed ubuntu and started working with Java since then. In the meanwhile however I became more ...
176
votes
16answers
125k views

When are Getters and Setters Justified

Getters and setters are often criticized as being not proper OO. On the other hand most OO code I've seen has extensive getters and setters. When are getters and setters justified? Do you try to ...
37
votes
6answers
10k views

Good example of complex code using TDD [closed]

What would be a good example of the use of TDD in large, real-life, complex, projects? All the examples I've seen so far are toy projects for the purpose of a book or a paper... Can you name an ...
11
votes
3answers
7k views

Is there a good reason to use Java's Collection interface?

I've heard the argument that you should use the most generic interface available so that you're not tied to a particular implementation of that interface. Does this logic apply to interfaces like java....
7
votes
8answers
1k views

Examples of Java APIs that demand an action sequence

As part of a research I'm working on, I'm looking for public APIs that only work correctly when you apply a certain sequence of actions on them. For example, the java.nio.channels.SocketChannel class,...
25
votes
14answers
13k views

Why do we study Java at university? [closed]

Java is often found in academia. What is the reason behind that?
24
votes
1answer
13k views

Why does Java exit with success after an uncaught exception?

Any time a Perl, Python, C++ or Tcl program halts with an unhandled exception, those language runtimes take care to register a non-zero exit code for the process. Even Eclipse-based programs return 1 ...
169
votes
10answers
24k views

Mono is frequently used to say “Yes, .NET is cross-platform”. How valid is that claim? [closed]

In What would you choose for your project between .NET and Java at this point in time? I say that I would consider the "Will you always deploy to Windows?" the single most important technical decision ...
13
votes
6answers
10k views

What would you choose for your project between .NET and Java at this point in time? [closed]

You are just starting a new project and you have these two technologies to choose from, Java and .NET. The project you are working doesn't involve having features that would make it easy to choose ...
20
votes
7answers
18k views

Is Java (still) the cross platform language of choice? [closed]

When I started using Java in the nineties, it was all "Write once, run anywhere!" from day one. That was probably all true then and I was a part of the choir as well. I am not sure what to think ...
7
votes
2answers
599 views

Why would anyone need this java syntax?

One day while trawling through the Java language documentation, as you do, I found this little beauty lurking within Double: 0.25 == 0x1.0p-2 Now, obviously (!) this means take the number ...
14
votes
8answers
4k views

In Java, what are checked exceptions good for? [closed]

Java's checked exceptions have gotten some bad press over the years. A telling sign is that it's literally the only language in the world that has them (not even other JVM languages like Groovy and ...
11
votes
5answers
3k 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). ...
25
votes
17answers
15k views

What are some good assignments for an introductory course, to reach today's students? [closed]

I periodically teach an introduction to programming course using Java. I want to give my students some exciting assignments that they can relate to or find interesting. At the very least, I want ...
11
votes
10answers
17k views

Java or C++ for university CS courses?

I'm in the throes of getting myself enrolled in school to get a CS degree. The school I am looking at actually offers both Java- and C++-based for the introductory software development courses (object-...
7
votes
8answers
16k views

What is a “wrapper” program?

Where I work, employees use a third-party desktop program for their clients. This program saves data to a flat file. My colleague wants to write a Java program that uploads that flat file to a remote ...
1
vote
3answers
325 views

Mod lines in Java code

Often in C code (and some other languages as well) I have seen a section in the top-level comments for mod lines. These include the date a modification to the file was made, the user who made the ...
12
votes
6answers
7k views

What are the Top Developer Productivity Tools/Plugins for Java in Eclipse?

I personally use CodeRush in Visual Studio 2010 to do refactoring, write code faster with templates and generally navigate my code 10 times faster than stock VS. Recently, I've been working on ...
11
votes
5answers
1k 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 ...
4
votes
2answers
10k views

What sort of Design Patterns do you use in Android Development? [closed]

I have been developing on Android for a couple months now, and building upon one in house program I found the scalability to be lacking. I have that gut feeling that if I applied some OO Design ...
21
votes
9answers
3k views

How to teach Exception Handling for New Programmers? [closed]

How do you go about teaching Exception Handling to Programmers. All other things are taught easily - Data Structures, ASP.NET, WinForms, WPF, WCF - you name it, everything can be taught easily. With ...
5
votes
9answers
7k views

Are Java applets worth learning? [closed]

I'm on the way of learning Java myself. I find most of texts giving emphasis to Java applets. I got confused about the importance. Is it something widely used? Do I need to spend more time on it?
5
votes
6answers
4k views

Write once, run anywhere. Is it still relevant? [duplicate]

Since Oracle bought Sun and Apple have decided not to continue developing their JVM, is the "write once and run everywhere" model still relevant or has web services/SOA reduced it to an edge case?
8
votes
3answers
5k views

Jython and JRuby vs. Groovy (and Java) [closed]

I am very interested in Python for programming on the JVM, and I've worked in Java and Ruby (not JRuby) a lot, and to a certain extent in Groovy. What are the limits to the Java-Jython and Java-JRuby ...
9
votes
6answers
6k views

Should I learn java for mobile application development or will C# just do?

I'm looking forward to delving into the .NET framework but most mobile applications seem to be developed in Java. I'll most probably be targeting the less pricier phones like Nokia and motorolla not ...
27
votes
5answers
4k views

I want to start using TDD. Any tips for a beginner? [closed]

I never used an automated test mechanism in any of my projects and I feel I'm missing a lot. I want to improve myself, so I have to start tackling some issues I've been neglecting like this and trying ...
24
votes
4answers
6k views

Which algorithms and data structures should a developer absolutely know? [closed]

I want to be a successful enterprise Java developer. With what algorithms and data structures should I be well versed? What books would you recommend to me? To be a successful Java developer, do I ...
6
votes
1answer
1k views

AGPL-compatible license

I am using a java library licensed under AGPL3. However, I would like to license my own work as BSD, such that my code could then be integrated in proprietary projects if one strips the library. Will ...
4
votes
1answer
298 views

CMP Entity Beans as a “naive” ORM solution

I was browsing through this talk about "Historically Bad Ideas" over the history of Computer Science, and found an interesting presentation about the rise & fall of the Java Enterprise initiatives....
6
votes
2answers
3k views

How would you name import and export functions in Java? [closed]

I have a Java class that handles import and export of data. It started out as a simple private void export() { } private void import() { } Of course, I wrote the export first, committed it, and then ...
14
votes
4answers
1k views

Is Java to Linux what .NET is to Windows? [closed]

Is Java becoming the de facto standard from Linux application development in the same way .NET is the standard for Windows application development? If not why not?
5
votes
2answers
1k views

How much logging should I do at production for SQLExcpetions?

I'm writing a small database-centric application in Java Swing that will be used internally in a small company. I haven't much experience with developing production-level applications. I don't use an ...
7
votes
6answers
3k views

What unit test frameworks exist for Java?

I've used TestNG and JUnit. What other frameworks are out there? What makes them special and/or different from the rest?
4
votes
2answers
339 views

Do you consider mainframe as part of large application deployments? [closed]

When you are setting up your system landscape for large and/or multiple application deployments, do you consider mainframe? If not, why not? If so, what factors are you considering. If you take a ...
1
vote
10answers
25k views

Java Vs .NET Vs Oracle(DBMS), Which technology is for Long Term Career? [closed]

I want to know about Which language is best for long term career and How? Which language should I choose among Java and .NET Platform or Should I choose Oracle like DBMS Language (SQL/PLSQL)? I am ...
15
votes
8answers
2k views

How do you encourage your organization to move from Java to Scala? [closed]

Has anybody's organization started the migration from Java to Scala? If yes, how do you do that? What can I do to encourage my colleagues to do the same?
61
votes
18answers
77k views

Why do people still say Java is slow? [closed]

For a long time in SO and in other places Java has the reputation of being slow. From jokes to many comments in questions and answers, people still believe Java is slow based solely on experience with ...
41
votes
25answers
104k views

Will Java still be relevant in 5 years? [closed]

Will Java have the same importance it had in the past, or it will be less relevant than nowadays?
9
votes
10answers
13k views

Switch from C# to Java, which “gotchas” I should care?

I may have to switch to Java for new project. I have very little knowledge about Java, because I've mainly studied and used C#, and I'm afraid of the differences between these two language/platform ...