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
1answer
11 views

Continuous Batch Processing in Java

My team has written an application which we've decided needs to run a process, we'll say about once a day, as long as the application is being used. I've never done anything like this in Java before ...
-6
votes
0answers
23 views

Keep up to date with new programming features [on hold]

I have tried researching everywhere but could find answer to my question. How to keep up pace with the new features that was added to the programming language? Such as: -html -C and C++ -Java
-3
votes
0answers
9 views

JButton not adding JLabel with an ActionListener [migrated]

I've started working on an extension of a project I've been working on for a few months, and I've felt the need to take it out of the console and put in in a GUI window. So far everything's going ...
-4
votes
0answers
40 views

Java - Trying to convert a java app to a website app [on hold]

I'm adding a function to my site that is a game tab. Im writing the games in java and have done several done. But my problem is that i can't port them to the site, i really have no clue how to port ...
-2
votes
0answers
42 views

How to get key depending on the value from HashMap [migrated]

I have a HashMap in Java (named queue) which with Integer as the key and List of messages as a value related to each key. I want to visit all values of List<messages>, and compare each entry ...
-4
votes
0answers
27 views

How to create a link between a printer and my machine? [on hold]

How do i create a link (communication) between my computer and a t-shirt printer via java code , do i create a web service ?
-5
votes
0answers
40 views

improve skill to higher and higher levels [on hold]

i have finished several tutorials and online courses for tags programming language. but recently when i go to any interview they asks me about previous and since i am beginner i just had small task ...
-1
votes
2answers
111 views

Advantages of these recommendations in ooprogramming using Java

Below are the recommendation from section 5.1 of this essay. While Java is not a pure object-oriented language, it is possible to program in a pure object-oriented style by obeying the following ...
-3
votes
0answers
26 views

Android developer transition to a Java Developer [on hold]

I've been an Android developer using Java for 2 years now. I have never learned Java from scratch, I just went straight into Android Development, watching hours and hours of video tutorials on ...
-5
votes
0answers
41 views

Memorization of sorting algorithms [on hold]

folks! I've been studying the sorting algorithms in Java and have been having troubles with implementing those methods without using the notes and/or any reference websites. I understand how each of ...
-1
votes
3answers
194 views

Why List<E> interface is additionally introduced in collection hierarchy? [duplicate]

Below is the diagram, where, if we just consider the implementations of List, AbstractList maintains the core behavior of list. To introduce the new implementation class MyList(say) one can ...
1
vote
1answer
23 views

How can I avoid needing to check for the existence another vertex when adding to an adjacency list?

I'm writing a Graph, and decided to make the Adjacency List its own class. Right now, (stripped down) it looks like this: public class AdjacencyList<Vertex> { //A map between a vertex, ...
22
votes
8answers
2k views

Is overriding Object.finalize() really bad?

The main two arguments against overriding Object.finalize() is that: You don't get to decide when it's called. It may not get called at all. If I understand this correctly, I don't think those are ...
-4
votes
0answers
24 views

Small Java Application that communicates with my disk publisher XR [on hold]

I'm given a task to create a small java application that will communicate with the Disk Publisher XR when ever a job is sent to it, in a nut shell I'm developing a Just-In-Time Production website that ...
-4
votes
0answers
21 views

what are the Practical ways to implement API in JAVA? [on hold]

I got the API from this url:"http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/geoprocessing/tools/conversiontools/CadToGeodatabase.html" I don't know how to use it. ...
1
vote
1answer
51 views

Polyglot Node.js with Typesafe Akka for Actor Model

I have case that needs manipulate large stream of JSON and injecting it to Apache HBase. Our system works on Node.js with Mongo then, since we needs to enhance performance so HBase is choosen to ...
-2
votes
0answers
20 views

Making a decentralized network of servers and clients in Java [on hold]

I'm working on a java assignment.So far I've written a simple SQL-like program in which a Server stores all the data and different clients can be connected to it with their username and password, to ...
4
votes
4answers
101 views

Creating two-way object references and keeping data integrity

I have two different classes; a Player and a Group. I need to be able to query a Player which Groups they are registered to (player.getGroups()), and which Players are registered to a Group ...
0
votes
0answers
78 views

BDD, Cucumber best practices

I'm trying to understand some best practices when it comes to BDD and Cucumber. I've only recently started to use it, and the first feature I have written a test for is testing a search feature, more ...
-3
votes
0answers
32 views

To open a created java project from a javacode [on hold]

I have created a java project via this syntax, IProject project= root.getProject(projectName); IJavaProject jproject= JavaCore.create(project); ...
0
votes
0answers
75 views

Is java interface also good for defining core behaviors? [on hold]

This comment says that: Interfaces are also good for defining core behaviors! with one of the example taken as interface List<E>. My point of view: Taken from reference, item-18: Interfaces ...
1
vote
2answers
84 views

Joshua Bloch Enum Singleton and Third Party APIs

In the book Effective Java he give the best Singleton pattern implementation in his, that is implement by a Enum. I have doubt to how to implement this pattern with a third party API. I'm using an ...
0
votes
1answer
90 views

Artificial intelligence decision making [on hold]

So I am working on a artificial intelligent assistant that is supposed to help you making correct decision when playing the game domino. Basic rules: http://www.pagat.com/tile/wdom/caribbean.html As ...
-1
votes
0answers
41 views

how to write JUnit testing using inteliij idea? [on hold]

I am fresher in IT industry and new to writing tests specially of Junit testing tools.Can anyone help with few examples on Junit testing which will cover testcode on some complex programs
-2
votes
0answers
59 views

Having trouble with a for loop evaluating incorrectly [migrated]

I was having this problem today and I'm not sure what causes it. The following code: int totWidth = 19; String header = "Kalle's Numbers"; if (totWidth > header.length()) { for (int j = 0; j ...
-2
votes
1answer
97 views

How to structure my Android app? [on hold]

I would like to know how to structure my android app. I'm totally new to Android and i'm used to HTML/JavaScript/Java API. So while i already have a working Java API, i would like to use this one. My ...
2
votes
2answers
161 views

Java: using final keyword only on method parameters that expect immutable objects? [on hold]

I came across the interesting topic about final method parameters and that they essentially don't provide much advantages. I wondered if it would be sensible to mark only those method parameters as ...
-3
votes
0answers
49 views

is it an implementation issue or a bug? [closed]

As much as I know compiler must give an error of incompatible types, as Object Class is parent of all classes, so the statement Parent c2 = new Object(); must be erroneous, but compiler didn't give ...
0
votes
0answers
46 views

Java calculator - binary calculations converted into hex/decimal ones and vice versa [closed]

Over the couple of days i made a very simple calculator in java, which was basically just adding/substracting/etc. two numbers. The two values where stored in double variables, as well as the result. ...
0
votes
2answers
44 views

Using GNU GPL with classpath exception licensed library in a GNU GPL licensed project

I am working on a project that uses ABCL. License of ABCL is GNU GPL with classpath exception, which means we can link this library with independent modules to produce an executable, regardless of the ...
-3
votes
0answers
44 views

How to deserialize multiple objects from file [closed]

I have this much code with me. Deserialization works fine for one object but not for many. i even tried by checking while((i=fin.read())!=-1) but it's not working Please help me with it public class ...
0
votes
1answer
92 views

Is the use of set / get prefix discouraged for methods if they don't actually mutate / access fields

This could be a quirk of the IDE I am using, Android Studio, or it could be something more nuanced that I don't understand. I have a method setCustomFont that appears as a property in the Structure ...
-7
votes
3answers
132 views

Why different languages have different syntax? [duplicate]

Different programming language always/most of the time use different syntax. For example take PHP, Java and Python. In Php & Java semicolons are compulsory at the end of the line, yet Python ...
2
votes
2answers
203 views

interpretation of the statement in java

I am confused over the interpretation of the following statement Fruit x= new Fruit(); My interpretation is that the new operator along with Fruit(); creates a new object somewhere in the memory. ...
-4
votes
0answers
39 views

Java Program Output Incorrect [closed]

I am having a horrible time trying to get this program to output correctly. The program has no errors, but when I run the "test" it outputs: Also when I run the program to enter my own data the ...
-6
votes
0answers
23 views

How to build hotel reservation panel with month view in core java [closed]

I want to build a hotel reservation system for desktop using core java but when i come to reserve a room for multiple dates it becomes brick always, i also want a month view which show booked and ...
0
votes
1answer
29 views

JEE MVC, controller calls the interface instead of the interface implementation

I'm following this tutorial: http://wiki4.caucho.com/Building_a_simple_listing_in_JSP It creates a basic web application in Eclipse using the MVC pattern with Resin as the web container. Here's the ...
1
vote
3answers
141 views

How to use Guice for an effective API Design?

I am creating a base API in JavaSE, which includes modules like MVP architecture, Service & Repository Layer, Event Model to fire events between presenter etc. I am trying to implement all best ...
-3
votes
0answers
13 views

How to pass a string value to a String with “ ” [closed]

So it's kinda a simple thing but i can't find a way to do it without getting a syntax error.So i want to pass a string value from a variable to another.So lets say i have a variable. String view= ...
0
votes
0answers
56 views

Strategy for writing a scalable chat server in Java [closed]

Currently I'm creating a chat server in Java using socket, seems that is the natural choice for a newbie java programmer. What are the strategies that need to be taken in order to scale the chat ...
0
votes
0answers
64 views

Pattern to share fields in inheritance

I'm trying to figure out the best way to solve a design issue. I have to be able to clone (I'm cloning them to Apache HttpClient) different types of HttpServletRequest (POST, GET...) and then send ...
0
votes
1answer
20 views

Where to store (data) classes for webservices

So I'm pretty new in my current company and my current task is to create a webservice that sends some serialized java objects from service A to service B using jaxws (webservices). The senior on the ...
0
votes
2answers
75 views

guideline on void methods that do not throw exceptions

In our codebase I saw a method that is similar to following: public void doSomething() { try { ... } catch (Exception e) { ... //log something ... } } ...
0
votes
2answers
85 views

Efficiently find whether Binary Search Tree is Height Balanced or not?

A binary tree is height balanced if and only if the two subtrees of root are height balanced and the difference between the two subtrees height is at most 1. I implemented a code in java to find ...
-3
votes
0answers
34 views

.jar file to interact with C++ console application [closed]

I know this is probably a difficult and/or insane question, but is there any way that I can make a .jar file that can type things into a C++ console application? I made a .jar GUI in netbeans, and I ...
-3
votes
1answer
75 views

Java - Best way to set properties of an object [closed]

I don't know if there is any difference in performance, or its just a matter of choice, but I am a perfectionist like that, and I'd like to know. Lets say you have the object HolySheet. You can set ...
0
votes
0answers
25 views

DDD Request Validation Handling

I stuck somewhere that I can't find a solution! There are plenty of validation questions here, but as far as I see, most of them were asking about entity validation. But what about request validation? ...
5
votes
1answer
119 views

Where to initialize objects

I have an BallEntity class that is part of a game that uses a Entity Component System architecture. This class have 'components' that are like the attributes of that class. I create and initialize ...
0
votes
0answers
44 views

Naming a class: Shadowing or Mirroring or something else?

The following class basically seeks to maintain a copy of the contents of a JMS Topic. The method onMessage() is called whenever a Messages arrived on a JMS Topic. public class TopicListener { ...
1
vote
0answers
59 views

Efficient extensions of degree of separation

I'm trying to play around with the 6 degrees of separation problem, specifically the Kevin Bacon game to find alternative ways of playing the game. I want to eventually port it over to MapReduce, but ...