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
6 views

Why is my JFrame not visible when running my Java application in eclipse?

Hi there and thanks for having a look at my question. I'm facing the following problem when developing swing applications in Eclipse: When I try to start a simple swing JFrame application (for example ...
0
votes
1answer
52 views

Is it weird that i search online for help alot? Not a technical one [on hold]

So I am not a very expert programmer "YET". I just have few questions about my approach to android and java. 1) Is it wrong that i search for help online alot? 2) I started android programming ...
0
votes
0answers
8 views

Trying to write my own algorithm for the Fibonacci Sequence [on hold]

So I am 15 and love Computer Science and programming. I understand that Computer Science involves a lot of algorithmic programming, and would like to get in to this, rather than UI and application ...
0
votes
0answers
12 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 ...
-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
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 ...
31
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) ...
-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" ...
0
votes
1answer
126 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 ...
1
vote
1answer
91 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
212 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 ...
-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 ...
-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 ...
-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.
-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 ...
-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 ...
0
votes
2answers
88 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 ...
-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 ...
-9
votes
0answers
40 views

help me its showing error [closed]

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 ...
3
votes
2answers
130 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, ...
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) -> ...
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
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 ...
-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
vote
2answers
229 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 ...
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 ...
-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 ...
-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) ...
-1
votes
0answers
43 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
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 ...
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, ...
4
votes
2answers
162 views

Understanding JAVA generic keyword 'super'

Recently some people said that I was wrong when I explained why one cannot insert a Number object into a list declared as List<? super RationalNumber>. (This assumes that RationalNumber is a ...
-1
votes
1answer
50 views

Is any one of these the right way to write a license for your opensource project forked and modified from an existing one with different authors?

I've used parts of source from an existing Java library project with what appears to be a 3-clause BSD license. I've made significant changes to the library which makes it possible to use it in a new ...
3
votes
2answers
100 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
0answers
25 views

Remote limitations of hg4j?

I’m evaluating hg4j to see if it’s useable in my current project. I need a (preferably) pure Java hg library that can: Check out a working copy of a remote hg repo at, say, ...
1
vote
1answer
87 views

Pros and cons of custom exceptions [duplicate]

This may be an pointless question based on opinion, style, and context but I've been racking my brain trying to decide whether or not to make use of custom exceptions and would love to hear some pros ...
3
votes
2answers
626 views

Why does C# have much more features than Java? [closed]

Please note that this isn't meant to be a Java vs. C# argument. I'm a Java programmer with no C# experience, asking just out of curiosity. I did some reading on C#, and it seems it has much more ...
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 ...
0
votes
0answers
8 views

Select design pattern - user stage [duplicate]

I'm struggling to point a finger into the right design pattern. I have a web site which user can register and interact with the system. I want to add the following abilities to a user: Each user ...
0
votes
3answers
153 views

In Java, what are some good ways to separate APIs from implementation of *entire projects*?

Imagine you have a software module, which is a plugin to some program (similar to Eclipse) and you want it to have an API which other plugins can call. Your plugin is not freely available, so you want ...
-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
3 views

What method call in HttpsURLConnection actually sends the HTTP request? [migrated]

I am new to the HttpsURLConnection class in java, and looked on the doc and found it not very enlightening. I have inherited this code on a project I am working on (I did not write it myself) and ...
0
votes
0answers
15 views

Best approach for storing banking information [migrated]

I am currently developing an auction desktop application. At the moment I am storing the buyer and vendor information in 2 separate tables within a MySQL Database. Currently the data for these tables ...
17
votes
4answers
522 views

How bad is it calling println() often than concatenating strings together and calling it once?

I know output to the console is a costly operation. In the interest of code readability sometimes it is nice to call a function to output text twice, rather than having a long string of text as an ...
-1
votes
1answer
107 views

Programmer Analyst vs Software Engineer [closed]

So I've heard the job title "programmer analyst" and "business analyst" thrown around for software jobs recently. How do the responsibilities of Programmer Analysts, Business Analysts and Software ...