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

1
vote
2answers
86 views

Could changing the return type from void to string introduce breaking changes?

This SDK have an interface like this: public interface Contract { void update(..); void action(..); void delete(..); } Now, we need to change it to something like this: public ...
-3
votes
1answer
62 views

Questions about a java developer job > semiconductor industry [on hold]

I am an experienced java ee developer and I got this job offer: A java developer for a company that produces software solutions for the semiconductor industry. I've got two questions: 1- ".. ...
-4
votes
0answers
34 views

I need a program of factorial and then this [on hold]

Make a program that outputs a factorial of any number and then compute its running time and prove that that running time is an element of theta n^2
-2
votes
0answers
23 views

What is the dereferenced in switch block? [on hold]

I executed the following code and I got the following errors. RunUnitConvert.java import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import ...
0
votes
0answers
28 views

How should I go about making a statistics analyser?

I'm making a program which should analyse the stats of all soccer premier league players in fantasy football (form, price, fixtures, injuries etc) and using those stats, predict point potential/value ...
0
votes
3answers
80 views

Implementing a Generic List in Java

In an effort to understand Generics in Java (and how to use them), I am trying to implement a list structure using them but have hit a wall. Scenario: Suppose there is some classes (we'll call them ...
0
votes
2answers
122 views

Design Patterns: What design pattern should I use for the following? [duplicate]

I am trying to write an utility which traverses through a list of files and searches for a string in each file. On finding the string in a file, I will add it to a list and display the list. Which ...
2
votes
1answer
119 views

Good Coding practice with respect to interface versus class versus super class

I am currently reading the following tutorial and have gotten up through here http://docs.oracle.com/javase/tutorial/java/concepts/interface.html Maybe I should not be thinking about this question ...
-4
votes
0answers
32 views

Windows custom lockscreen program [on hold]

I'd like to create a windows application that locks my screen, I want the program to have the same functionality as this program but I want to add functionality to it so I can play custom sounds and ...
0
votes
0answers
70 views

Is it possible to miss a connection?

I'm writing a simple asynchronous tcp server & client program and I am curious if it's possible that the method "waitForConnections" misses a connection because it's still busy with accepting the ...
-5
votes
0answers
41 views

Auto Moving Objects using Java [on hold]

Hi guys i am new to this field, but i am willing to learn java. So i have chosen games to learn java i am developing a game called Shooter, which requires images to move in its own...... So someone ...
-5
votes
0answers
47 views

How to develop logics in java programming? [on hold]

I am working as a Manual Tester from 3years,I feel it is right time for me to choose a career in Automation. As a part of it I have selected 'Selenium with JAVA' is the best platform to enhance my ...
3
votes
4answers
128 views

Design strategy for wrapping exceptions

I'm implementing a type of Repository for a framework/library that has (roughly) the following: public interface FooRepository { boolean contains(String id); Foo fetch(String id); void ...
0
votes
0answers
29 views

Queries regarding getting a job as a software developer [on hold]

I'm Computer Science Fresher and is looking for a good job in software devlopment. I know topics like Core Java, C++, data structures, SQL etc. I have following queries - 1) Should I learn ...
-2
votes
0answers
13 views

java.util.ConcurrentModificationException while removing items from collection [migrated]

I am learning Java's Collection framework. I wrote this little program to check why we can't use For-each to remove elements. Code: import java.util.ArrayList; class intro{ public static void ...
1
vote
2answers
171 views

Java difference between String a = null and String a = new String()

It a pretty naive question to ask but I got this doubt while programming for android. I use to initialize my new strings like String a=null, so in my code there remains a probability to get ...
27
votes
6answers
4k views

Is throwing new RuntimeExceptions in unreachable code a bad style?

I was assigned to maintain an application written some time ago by more skilled developers. I came across this piece of code: public Configuration retrieveUserMailConfiguration(Long id) throws ...
-3
votes
0answers
17 views

Please recommend an IDL/RPC framework that works with Java and Python [on hold]

I'm looking for a framework that supports RPC from Java to Python, where the message format can be defined via a simple IDL. My requirements are: Must be high performance Must support streaming ...
1
vote
0answers
42 views

How long to learn Java EE if I learnt Java SE? [on hold]

I hope I did post at the right category for my question. First of all, I am currently looking for a job and from what I see is that there is quite a demand for programmers knowing Java EE rather than ...
3
votes
3answers
192 views

Is enum order sensitivity an antipattern?

Is it an anti-pattern to depend on a particular order of an enum's instance declarations? For example, consider: public enum CompassPoint { North, East, South, West; } These points ...
1
vote
0answers
38 views

How to design an interface for two similar but distinct objects

I'm designing an API for a JavaFX control to be submitted to the ControlsFX library. This control is called the ViewManager, and its purpose is to hold a collection of View instances, all of which ...
2
votes
1answer
67 views

Define an object with the interface as a type instead of class name [duplicate]

I try to practice with the design patterns and explore one of the possible implementations of the Observer Design Pattern in Java. I paid attention, that in this example the object is defined with the ...
0
votes
0answers
15 views

Database search results by deviation from query in Java

When every i try something new, I always 'throw myself in the deep end'. I'm in the initial stages of an android app build (my first android app, and first attempt at anything java) I want to know ...
1
vote
0answers
18 views

How to get and save Wordpress content (html, css, images, videos) from a Java program? [migrated]

I apologize if it's not the good place to ask this question. Please if it's not help me to find where I have to ask it. So here is my challenge. I need to get and save Wordpress content (html, css, ...
1
vote
0answers
56 views

Simulating fluid transfer in a pipe [on hold]

I know this is a fairly large/broad category, but I've been racking my brain over the last few weeks on how to simulate fluid flowing through pipes. In the environment I'm working, I can have a single ...
6
votes
1answer
68 views

Optional features: default method or separated interface

Dedicated interfaces seems to be a good way to expose the optional features in a domain-specific type hierarchy. However, they impede the use of decorator and composite patterns, which is also common ...
0
votes
1answer
106 views

If everything is supposed to be an object in Java (barring primative types), isn't this contradicting the point of static? [duplicate]

I often write code which makes an object and then use static methods in static classes to manipulate said object. Am I missing the point of OOP? How do I know whether I'm thinking in the OOP mind ...
1
vote
3answers
137 views

Should class with only static data need to be instantiated?

I have two classes. 1. Node 2. MixedStateManager Node class: Node class maintains the state of nodes in the system. One such data is state. public class Node { private int state; ...
1
vote
1answer
40 views

Distributing a proprietary app together with an ASLv2'ed derived work

My proprietary Java app includes a modified version of a 3rd party library distributed under Apache Software License, version 2.0. The 3rd party library doesn't come from the Apache Software ...
2
votes
1answer
62 views

Distributing a modified OpenJDK class with a proprietary app

I want to distribute a Java class I borrowed from the GPLv2'ed OpenJDK and modified for my own needs as a part of my proprietary application. The header at the top of the source file states (and I've ...
-1
votes
0answers
29 views

Extracting Headings and paragraphs separately from xml files in Java [closed]

I first converted the xml file to a string and then tried searching for specific tags in the file. However, the string files are incredibly long (about 1.5 billion characters), so the search often ...
1
vote
0answers
80 views

Approach for polyglot logging

I'm building a desktop app with a Java front-end and very performance critical Fortran libraries. We've recently started pushing more of our code out of Java and into Fortran (see below) Soon we will ...
-6
votes
0answers
27 views

Java for web application [closed]

I want to start Java Web application.how to start I have a little knowledge of java programming Can someone help me step by step. It means that how to prepare for jsp
2
votes
2answers
199 views

private method that uses no instance members - better static? [duplicate]

I have a private helper method that uses no instance variables or methods, I feel it would be less confusing if it was static (this way, it's given fewer points it can access). I am a bit unsure if ...
-2
votes
0answers
38 views

Data Driven Validation/Rule Engine in JAVA [on hold]

I have data and series of validation (Business logic) before I can use it further. Like following :- { "site" : "UK", "domain" : "xyz.UK", "currency" : "DOLLAR", "type" ...
-2
votes
1answer
113 views

Does 'Iterable' interface look redundant in java? [closed]

By this below definition(pre 1.8) of Iterable, package java.lang; import java.util.Iterator; public interface Iterable<T> { Iterator<T> iterator(); } I would say that, Iterable ...
1
vote
0answers
35 views

Best JavaFX Pane of Structure for a Graph?

I will preface this question by saying that I am studying math and computer science at a university, but I have never been very good with graphics. I want to create a window that generates a square ...
-1
votes
2answers
88 views

Using nulls as Android application logic [closed]

I'm developing some Android applications. I am using null objects as the application logic. Is this approach okay or should I take another one and which one? Example: I use null objects logic when ...
0
votes
3answers
104 views

Surface Area calculations

For my program, I implemented AABB collision which works fine. When AABB collision detects a collision between 2 boxes, I want to find the surface area of portion where the 2 boxes are overlapping. Is ...
0
votes
1answer
43 views

How to better isolate JOGL or LWJGL3 dependency from game clients?

I'm currently working on a project to develop a relatively small framework with the goal of supporting game development efforts for students in a course. The scope of this project is an OpenGL-based ...
-3
votes
0answers
64 views

Developing android app that can communicate each other [closed]

My Objective I want to create two android applications that can communicate each other. Let's call them Application A and Application B for now. Application A will have some buttons which will send ...
-3
votes
0answers
17 views

Host Java CLI through Heroku [closed]

I've got a CLI written in Java that I want to access through Heroku. I want to have a textbox where people can input a string, and it will get put into a file named text.txt and the CLI will be run ...
-4
votes
0answers
9 views

Upgrade to Weblogic 12c and using jaxws 2.1 [migrated]

Could you please explain if someone have occurred the following situation? I have upgraded the application server from Weblogic 10.0 to Weblogic 12c. Also I have generated a webservice using the jaxws ...
-3
votes
0answers
16 views

Want to start with spring [closed]

I am an undergraduate. Me and my team is on a project to build a web site. At this moment this is with not much functionalities. But we have future plans develop the application with much more ...
4
votes
3answers
207 views

Creating a Java project without using any objects and just calling static methods on input?

I'm creating a program which takes a document, extracts it, and then moves this into a database. I've done most of this now and I've realised that I haven't made any instances of classes I've made (I ...
0
votes
1answer
43 views

Promise Akka Play Java Sequence

I have an actor which is having three asynchronous web service calls. Lets say A,B and C. All return promise objects which has their respective response. I added loggers processA,processB,processC ...
-5
votes
0answers
67 views

Difference between += and =+ [closed]

What is the difference between += and =+ ?(java) I thought they are the same and I can use them interchangeably. Now I see =+ cause a lot of problems when += works "proper".
-2
votes
0answers
23 views

TypeMismatchException when creating a Google visualization datatable with date type column [closed]

Ok, so after trying really hard for some days i am still not able to make this work. This is the problem: I have a JSP which hosts a Google chart that is going to be constructed from data that is ...
-1
votes
2answers
67 views

Will statically typed, compiled programming languages be affected by Microservices Architecture? [closed]

Judging based on my experience, as systems grow bigger, statically typed languages like Java or C# tend to be more reliable and easier to manage. But do we need all the advantages of such languages ...
2
votes
1answer
77 views

What is the best way to store a formula in a database for a table driven formula? [closed]

So I am changing my code over to a table driven formula system to make it sustainable in the long term. So basically I have 5 foreign keys that will get me to a single formula to use. However I'm ...