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
2answers
1k views

As a C# developer, how much “advanced” Java do I need for Android development? [closed]

I'm a professional .NET -C#- developer who's interested in doing development for Android. I'd like to know if it's really necessary for me to first read a book or two on Java (like Java For ...
1
vote
3answers
2k views

Is anybody using JavaFX

I'm very tempted to use it purely because of its neat Binding APIs, and now that you're able to use it in conjunction with Swing it feels like a natural progression. The only thing that I can seem ...
0
votes
5answers
3k views

Possibility to switch over to Java from .Net [duplicate]

I am an MCA fresher and will be working on dot Net for next few months (almost 10-12 months). After that I want to switch over to Java. How is the possibility that I can switch over to it? What type ...
5
votes
6answers
331 views

How to keep a project easy to understand and intutive?

I am working on this project, which will soon contain loads of packages, projects etc. (Java). So, from the start I need to keep track of the high level package and class structure, monitor which ...
65
votes
21answers
42k views

“Don't do programming after a few years of starting career”. Is this a fair advice? [closed]

I am a little experienced developer having approximately 5 years experience in PHP and somewhat less in Java, C# and trying to learn some Python nowadays. Since the start of my career as a programmer ...
1
vote
6answers
2k views

Java API vs. Other APIs [closed]

I'm more at the novice end of the software developer spectrum, but nevertheless I've had exposure to quite a few programming languages and frameworks. From all the technologies I've used, I haven't ...
0
votes
1answer
182 views

Is using Singleton correct for Jtree & DefaultTreeModel?

Basically I have one Tree view which uses a single DefaultTreeModel. Is it okay to use singleton for Tree extending JTree and another singleton for TreeModel extending DefaultTreeModel? If not, what ...
1
vote
5answers
314 views

Case convention- Why the variation between languages?

Coming from a Java background, I'm very used to camelCase. When writing C, using the underscore wasn't a big adjustment, since it was only used sparingly when writing simple Unix apps. In the ...
2
votes
1answer
253 views

SUN Java and GPL V2 licence issue for linked applications

I have recently noticed that the Sun Java code has been released as GPL V2 code (see Google code repo). Does that mean that all applications written in Java and linked to Sun APIs (beans, and so on) ...
1
vote
1answer
375 views

Designing controller for modular Java architecture

We are designing a system which mimics a BPEL application with sets of functional requirements such as bulk messaging, managing SLAs, error handling and so on. One of the intentions is to modularize ...
4
votes
2answers
3k views

Low latency technologies for c++, c# and java?

I've been reading job descriptions and many mention 'low latency'. However, I wondered if someone could clarify what type of technologies this would refer to? One of the adverts mentioned 'ACE' which ...
1
vote
4answers
836 views

Matching my skills with Java and Web Programming [closed]

here is my main question: What is the most common way that Java is used in web development? The reason I ask: I am currently in the process of finding my first internship. Every employer has a ...
0
votes
8answers
4k views

Independent projects as a student to show off abilities [closed]

I'm an inexperienced student (having learned up to data structures and algorithms through various online resources) of computer science, and I'm hoping to get a job as a developer some time after I've ...
7
votes
7answers
5k views

Is it wrong not to create Javadoc for my code?

I do a lot of Java programming at my work (I'm an intern) and I was wondering if it is generally a rule to create javadoc to accompany my code. I usually document every method and class anyways, but I ...
10
votes
5answers
2k views

Future-proofing myself when learning to program [closed]

I want to learn to program in a 'future-proof' manner, if you like. Whilst Windows dominates the desktop OS marketplace (for now), obviously there is a lot of value in learning its languages/...
2
votes
2answers
686 views

Why profile applications using AOP?

When tuning performance in a web application, I am looking for good and light-weight performance profiling tools to measure the execution time for each method. I know that the easiest profiling method ...
4
votes
7answers
4k views

Should you answer programming interview questions with library? [closed]

Some questions can be answered easily by using specific language library. For example Java has Set, Maps, and List. Is it possible to answer those coding questions during interview by using these ...
14
votes
2answers
6k 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 ...
6
votes
6answers
4k views

Is java a good start to learn OOP? [closed]

I have good teacher who understands OOP. However, the language which he is expert in is Java and I don't want to learn Java. My question is, do you think if I learn OOP using Java I will waste my ...
9
votes
5answers
82k views

What is the exact meaning of Platform independence?

What is the meaning of platform independence? I am taking the case of Java. Can I run a Java application on Linux that built on Windows platform? Or the reverse? Can I use a same (or exact) ...
2
votes
3answers
1k views

Is it possible to have an effective VIM environment for both C++ and Python?

I have recently moved to a VIM environment for Python development. I learned the setup from John Anderson's outstanding web page on the subject. I am about to try and set up another VIM environment ...
12
votes
3answers
6k views

Improvements to Joshua Bloch's Builder Design Pattern?

Back in 2007, I read an article about Joshua Blochs take on the "builder pattern" and how it could be modified to improve the overuse of constructors and setters, especially when an object has a large ...
2
votes
1answer
366 views

Should I devise a FileHandler interface to deal with different Files?

My background has largely been manual testing and I started learning core java to be able to work with Selenium. I am wanting to write couple of reusable method, like reading/writing data from csv, ...
18
votes
2answers
25k views

what is the difference between callbacks and listeners?

In blackberry we can override keyChar() method and capture the keypress event or we can register onKeyPressListener. i know, onKeyListener is observer pattern. In android also there is a KeyEvent....
0
votes
3answers
1k views

Improving Cohesion and Coupling of Classes

I am given this set of code and need to suggest ways to improve the code's cohesion and coupling of the classes. But I thought these classes are quite well de-coupled since it looks like they are ...
2
votes
5answers
7k views

Does AJAX need to use a server-side language such as PHP/ASP.NET/Java to access a database?

Does AJAX need to use a server-side language such as PHP/ASP.NET/Java to access a database? Or some sort of web service tied to these languages? Or is AJAX able to communicate directly with the ...
3
votes
1answer
4k views

What is the best way to manage Hibernate sessions in a Struts-1 application?

I am now the owner of a Struts-1 application, and the Hibernate session management is all over the place. I have searched online documentation but have not found a clear explanation of the best way ...
6
votes
1answer
463 views

I have free time for Android development. I'd like suggestions on how to tackle this effectively [closed]

I'm finishing college for good tomorrow, then leaving my current programming job the next day. I'll be looking for opportunities, but I may end up with a month or two without a job, so with lots of ...
3
votes
4answers
214 views

Creating a library in two languages simultaneously

I'm planning on writing an open source HTML parsing library in .Net so that I have a project out in the wild when I start looking for developer jobs. Now, in my Masters program I started learning Java ...
24
votes
8answers
15k views

What to put in a try/catch? [duplicate]

Note on the question: this is not a duplicate, Efficient try / catch block usage? was asked after this one. The other question is the duplicate. I was wondering what was the best way to use try/catch....
11
votes
4answers
4k views

How to start learning J2EE, especially JPA [closed]

I am trying to start learning the J2EE part of Java. But I don't know where to start. I am familier with Core Java and mainly, I want to learn JPA and basics of Hibernate and Spring Framework. The ...
23
votes
2answers
42k views

Difference between Handler, Manager and Controller

Is there any difference between naming a class "Handler", "Manager" or "Controller"? IE: PurchaseManager, PurchaseHandler, PurchaseController. Do these suffices convey the same meaning or is there a ...
5
votes
4answers
859 views

Starting Java Web Services and feeling lost [closed]

After building mainly Java desktop apps and some small GWT services, I'm trying to learn how to build Web Services in Java but I feel overwhelmed by the sheer amount of buzzwords, terms, ...
2
votes
6answers
6k views

How should I approach developing a Java based client-server application?

I have been asked to develop a client-server application (requires database) for a company. I am very handy with java so would like to go with it. Its up to me how I develop the application. It may ...
4
votes
5answers
422 views

Organizing classes with many properties that need to be iterated through

Sometimes when I'm working with a class (usually one that represents a database model), I'll have about 15 different properties on it, usually of different types. These are properties that need to be ...
2
votes
3answers
543 views

Testing web applications written in java

How do you test the web applications (both server side and client side code)? The testing method has to work irrespective of the framework used (struts, spring web mvc) etc. I am using Java for the ...
8
votes
3answers
10k views

Going from PHP to Java [closed]

Having been programming in PHP for a year, I now want to start learning Java. I am in a Windows environment. I want to develop a GUI with Java that would query a MySQL database. I know I would use ...
6
votes
5answers
340 views

Can I use open source libraries in trialware?

I have written a small Java program which i'd like to distribute on my website. I have used a few external librarys which declare following licences: Apache License (2.0), LGPL and one API doesn't ...
4
votes
2answers
2k views

What is a good way to represent (programatically) graphs/networks?

SO I have made this program dealing with cities and the roads linking them, and I am wondering if anyone could point me towards a way to represent this "network" graphically (in 3 or 2Ds). Could be ...
4
votes
1answer
434 views

Is Java Plug-in still relevant? [closed]

When I challenged Chrome development team about their decision to block every version of the Java Plug-in by default (http://code.google.com/p/chromium/issues/detail?id=84001). They answered that Java ...
6
votes
5answers
11k views

What skills are needed for machine learning jobs? [closed]

I posted this question on Quora, but didn't get enough responses. reposting it here. I am a learner sitting at home and learning linear algebra, very interested on working in Machine Learning ...
5
votes
3answers
1k views

Is blocking java applets a necessary security measure?

Chrome 11 is now asking user permission to run both signed and unsigned Applets (yes, for signed applets the user is asked twice). Chromium team decided that this measure is needed even when the user ...
12
votes
5answers
1k views

Why do Windows Forms / Swing frameworks favour inheritance instead of Composition?

Today a professor of mine commented that he found it odd that while SWT's philosophy is one of making your own controls by composition, Swing seems to favour inheritance. I have almost no contact ...
4
votes
9answers
2k 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?
2
votes
3answers
439 views

Where should I include comments in my “self-documenting code”?

I'm currently developing a web-app by myself and have made it a point to use descriptive variable and method names (sometimes at the expense of brevity) in order to minimize commenting. The plan was ...
16
votes
5answers
40k views

Why Use Scala over Java

I am totally into Scala as a language ... and still I struggle with why any company should switch from Java to Scala. Is Scala just syntatic sugar on top of the JVM or are there fundamental ...
69
votes
4answers
7k views

Why were Java collections implemented with “optional methods” in the interface?

During my first implementation extending the Java collection framework, I was quite surprised to see that the collection interface contains methods declared as optional. The implementer is expected ...
2
votes
2answers
2k views

JRE for 64-bit and 64-bit Java?

FWIK Java can run on 64-bit system, no problem. I'd like to know how Java support 64-bit features, e.g., System.identityHashCode() returns a 32-bit int, it's common to see the object pointer (memory ...
7
votes
2answers
3k views

How does java resolve class names in a lot of jars?

Recently I found one of my Maven project have 100+ jar dependencies. FWIK a zip archive doesn't have index at all, so it should scan the whole zip to determine if it contains a specific path. But I ...
13
votes
2answers
15k views

Best resources for learning Play! Framework [closed]

Awhile back I discussed the possibility of moving to a startup that is going to be using Java, more specifically the Play! Framework; well, I'm going to go for it! I have been a .NET guy for a long ...