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
0answers
7 views

How can i get buckets from aggregation query?This is Belongs to elasticsearch [on hold]

I am using elaticsearch v1.1.1 How to use InternalHistogram and ih.getBuckets() returing 13 records but those are not readable.How to make them readable ? Please correct the code that helpful to ...
25
votes
8answers
2k views

Programming for future use of interfaces

I have a colleague sitting next to me who designed an interface like this: public interface IEventGetter { public List<FooType> getFooList(String fooName, Date start, Date end) ...
-1
votes
0answers
27 views

Dynamic website slideshow : which language?

I have been building my website along my programming skills and it's coming along nicely, but I'm at loss with how to engage the next part. I'd like to integrate a dynamic image slideshow this way : ...
3
votes
1answer
336 views

Hadoop and Object Reuse, Why?

In Hadoop, objects passed to reducers are reused. This is extremely surprising and hard to track down if you're not expecting it. Furthermore, the original tracker for this "feature" doesn't offer any ...
11
votes
6answers
2k views

What would truly happen if java.lang.String weren't final?

I'm a long time Java developer and finally, after majoring, I have time to study it decently in order to take the certification exam... One thing that has always bothered me is String being "final". I ...
0
votes
0answers
39 views

Interactive session with a command line program using Java? [on hold]

I plan to write a website frontend for a free computer algebra system (Reduce, http://reduce-algebra.com/). On the webserver I have a Java virtual machine running, and Reduce is also installed. I can ...
-1
votes
0answers
14 views

Book/Resource advise for OCA Java SE 7 1Z0-803/804 certifications [on hold]

I am trying to attempt OCA JP certification soon. I have made some research online for resources to best prepare for the exam. Popular suggestions seem to be Java SE7 Essentials by Michael Ernest and ...
0
votes
1answer
125 views

Why does this method return 2 values if I only ask for one and there is no sort of conditional statement anywhere?

I'm writing this very simple program from this one PDF called Think AP Java, and I can't seem to wrap my head around this: When I write public static double method_1(double x) { double ...
-6
votes
0answers
11 views

failed to load sources when it runs.i need to display the whole viewer page on browser [on hold]

Viewer <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" ...
-3
votes
1answer
131 views

As I learn to program [on hold]

Ok, life story in two sentences. I have been to college and have one semester left but I have obtained absolutely nothing from it (life lessons and the like don't count- I'm talking lucrative skills ...
1
vote
1answer
88 views

How Jetbrain Phpstorm IDE is working without installed java?

As far as I know Jetbrains PHPStorm is programmed in Java but while I don't have Java installed in my Windows 7 PC, PHPstorm is installed and working without any problem. How It's done?
-2
votes
0answers
33 views

What is the best way of using Java libraries from Python? [on hold]

There are plenty of math and scientific libraries written in Java. I prefer Python for programming though. I have tried Jython but it gets very laborious and convoluted at the moment of distributing ...
0
votes
2answers
210 views

how to approach pharmacy software project [on hold]

I would like to complete a pharmacy software proof concept. But I have a few questions I do not know. Physician information In order to refill or dispense a new RX the software needs to have access ...
18
votes
4answers
4k views

What is the correct way to handle debug output in Java?

As my current Java projects grow bigger and bigger, I feel a likewise growing need to insert debug output in several points of my code. To enable or disable this feature appropriately, depending on ...
1
vote
4answers
481 views

Regex to String generation

Let's say that we have a regex and an index i. If we suppose that the set of strings that match our regex are sorted in a lexicographical order, how could we get the i element of this list? Edit : I ...
-3
votes
0answers
43 views

What are Java, HTML, and Javascript technologies for producing basic reports with Excel export? [on hold]

We have several reports that are very basic in nature. Some reports accept up to 3 parameters. All reports generate a table with the result set. No pie charts, line graphs, etc. The reports can be ...
0
votes
0answers
77 views

How to design extension mechanism for java app

I have an application where I have a set of core features. The application itself HAS to work in core only mode. I would also want to make the application extensible such that, when certain ...
-3
votes
0answers
31 views

What is the best framework to develop an Android app that connects to an existing MySQL database through a web service? [on hold]

I have experience developing Android apps using both Eclipse (Java) and Xamarin (C#). I have never tried connecting my apps to a database until now. It sounds like I need to use Android tools to call ...
3
votes
2answers
128 views

Program Design clearness vs convenience

I've recently disputed with my colleague about the following situation: I've developed a framework that processes the resources (in java, although its not really important). It goes (simplified, ...
-2
votes
0answers
28 views

IE 11 Compatibility mode [on hold]

I want to add IE 11 compatibility mode in my code.I cannot use meta tag, as "". Please suggest me other than meta tag. Thanks in Advance.
4
votes
3answers
74 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) -> ...
6
votes
4answers
437 views

Scripts to run Java programs - e.g. Ant

My team currently use an Ant script to execute various Java programs. Note that I am not asking about managing the build/deployment cycle for which we are already using Maven (quite happily). For ...
0
votes
3answers
159 views

When to use default access modifier?

I want to understand, from design point of view, in what situations I should use default access modifier, and when I shouldn't. I found this related question, that provides some basic explanations, ...
0
votes
2answers
87 views

Way for java program to read file from when it was stopped

I am working on an application that reads a log file, looks for a specific string, sends alert emails and saves data from the file into a database. The reading functionality is working well, but I am ...
-3
votes
1answer
84 views

Java Multiple for loops [on hold]

I have a small java program I am working on where I am to calculate interest rates from 5%-10% after one year (this is for practice). However, when I try to print out multiple columns, it doesn't ...
-4
votes
0answers
22 views

Can anyone suggest me a good source for Exception handling and collection [on hold]

Can anyone suggest me a good source for Exception handling and collection. I have tried oracledocs, and scjp/ocjp books. But still I find that there is a lot more to cover. If anyone can suggest me ...
0
votes
1answer
76 views

Multilayered enterprise application use of JAXB objects

I am asked to refactor and maintain an enterprise application. Normally I'm used to using the MVC design pattern. This time however, I'd like to separate everything into layers (multilayered ...
10
votes
4answers
3k views

What are proven advantages of tools like GWT over pure JavaScript frameworks?

GWT is a software stack that translates Java code and a sub-set of the Java Runtime's class library to JavaScript code. In comparison with JavaScript toolkits, GWT can seem alienating, by nature and ...
-1
votes
1answer
218 views

Which Internet places are popular for commercial Java product announcements? [on hold]

For Java libraries (which I wrote in the past years) I found not so many places iin the Internet where developers could announce new releases. So I use paid advertising (banner campaigns) at the ...
-9
votes
0answers
40 views

help me its showing error [on hold]

class first{ int x; static first t2; private first(int val){ x=val; System.out.println("object is created"); } static first getob(int t) { if(t2==null) { first t1= new first(t); ...
0
votes
1answer
73 views

How can I perform a logical test to ensure that MY CUSTOM ERROR gets thrown instead of the NumberFormatException?

I am working on something that should be fairly simple. I have 95% of my program working, but one piece is still not fulfilling the requirement. (FYI, this is for a homework assignment, but I will ...
0
votes
0answers
77 views

Result Object vs. Exceptions [on hold]

Related to this question I posted earlier: Returning results of method on batch list? I stumbled across an interesting idea at: https://www.braintreepayments.com/docs/java/general/result_objects ...
1
vote
1answer
91 views

How to create Public API wrapper with different configuration parameters

I'm looking to see if there is a design pattern that can solve the following problem. The example is fairly specific but the goal is a public + internal API. I need specific information for my ...
1
vote
2answers
228 views

Is it okay if we use an arbitrary string as UUID?

I found the tutorial of client (android) and server (pc) bluetooth tutorial from here. But my question is about the UUID. Is that okay if we define it randomly without the proper format? Because I ...
-2
votes
5answers
2k views

Why is Java's reflection package considered the dark side of the force? [duplicate]

Possible Duplicate: Why should I use reflection? Does it allow access to private members which would otherwise be inaccessible, thus breaking the intentions of the original design ? Is it ...
-1
votes
0answers
47 views

Android Set Device DIscoverable (bluetooth) without any dialog [migrated]

How can I set the dialog to be hidden / suppress it to Yes when I try to execute the following code below? discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); ...
-1
votes
0answers
73 views

Automatically expose large software library using web services? [closed]

(Edited from initial post) Lets say I want to automatically generate web-service wrappers for some large arbitrary source code library (it doesn't matter which language). The aim is touch-free ...
1
vote
2answers
6k views

Java language book for an experienced programmer? [duplicate]

Possible Duplicate: Is there a canonical book for learning Java as an experienced developer? I am looking for book to get up to speed with (start with) a Java language. I am experienced ...
0
votes
1answer
76 views

Automatically create or update object in database

I have a database class with the following interface: public Database { //returns false if p (its ID) is already available //otherwise adds p the the list and returns true public boolean ...
1
vote
3answers
343 views

Linked list clarification

This is a pretty simple question but I'm new to java. The linked list found in java.util.LinkedList. I saw elsewhere that Java does not use pointers... When I create a new list and add new elements ...
-3
votes
4answers
100 views

Try Catch and possible NullPointerException [closed]

Sometimes I am in the situation that I want save the result of a function call into a variable but the function could throw an exception and i want to handle this e.g. by throwing another (chained) ...
-3
votes
0answers
20 views

How to do the official Spring REST tutorial with out using @ComponentScan? [closed]

Here's the tutorial refering to the part where it quotes The @ComponentScan annotation tells Spring to search recursively through the hello package and its children for classes marked directly or ...
-1
votes
0answers
41 views

Wifi Communication between two device without intermediary device [closed]

I want to develop an app that will be deployed in two android devices for making them communicate through wifi. And here is the case: Two devices are turning on their Wifi They're not connected to ...
0
votes
0answers
42 views

How does the android JNI work [closed]

I am currently trying to create an iPhone/android app I have chosen to write the model of my program in C++ since it is supported by both platforms. I have been able to compile my C++ source into the ...
-6
votes
0answers
57 views

Best company to Join for long term better career? [closed]

I have total of 2.5 years of experience in Java/J2EE, Spring, Hibernate and SQL. Currently i have 3 offers in hand and got confused which one to join Money is not matter but long term career matters ...
1
vote
1answer
163 views

Where should I put bindings for dependency injection?

I'm new to dependency injection and though I've really liked it so far, I'm not sure where bindings should go. I'm using Guice in Java, so some of what I say might be specific to just Guice. As I see ...
-1
votes
1answer
69 views

What is the recommended way to go about porting large code bases? [closed]

I am currently porting a large library (150+ files, 15k+ LOC) from Javascript to Java. Fortunately, the original library is already very object-oriented, so this has largely been a matter of ...
0
votes
0answers
36 views

Finding coordinates x and y from arc [closed]

I am planning a race simulator car in JAVA and I have a problem to get the x and y coordinates from the graph (or circuit). I explain the problem better. If I for example, drawing an arc using ARC2D, ...
3
votes
2answers
99 views

System state design composition

Consider the following Java code: public class HumanStateImpl implements HumanState { private boolean alive; private Color skinColor; // getters and setters, other state fields ...
0
votes
1answer
177 views

MVC: How to Implement Linked Views?

I'm developing a java application to visualize time series. I need (at least) three linked views, meaning that interaction with one of them updates the others. The views are: A list represents the ...