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

-6
votes
0answers
10 views

Link's massive in webdriver [on hold]

I want create script where the 1st step is to open a website and the 4th step is to click on a button. The button I want to take is from massive. I'm getting an exception. Can you help me or give me ...
-6
votes
0answers
18 views

What things you take into consideration while developing a java web application? [on hold]

While developing a new java web application , what are the things we consider?
-1
votes
0answers
34 views

transitioning from C# to Java. [on hold]

I have spent the last five years programming in C#/.net and have been transferred to a Java team. What are some of the things I need to watch out for? What are some of the more enjoyable things I ...
-4
votes
0answers
28 views

Any birdview article about Web development with Java? [on hold]

I am new to Java Web development. And I am tasked to create a prototype with Java and related technologies in a short time. So I am looking for some birdview article about the Web development ...
2
votes
1answer
111 views

Why use a enum to create the singleton pattern [duplicate]

Why would you use an enum to create a singleton pattern? To what purpose would it serve over a conventional singleton pattern? I have seen the above used. The code uses an enum to create this pattern ...
2
votes
1answer
26 views

Applying initialization-on-demand holder idiom at variable level rather than class

I was looking for the idiomatic way to implement thread-safe lazy initialization for a configuration collection retrieved from the DB inside a Spring bean. I decided to adapt the ...
-3
votes
3answers
62 views

Simple project ideas [on hold]

I am looking for simple project ideas to help teach some of my fellow students. I am trying to team them the following: -If / else if / else -For and while loops -Logical AND / OR -creating ...
-2
votes
2answers
97 views

What is a good name for a class that interacts with a command line tool? [on hold]

I'm writing a program in Java that includes a component that will interact with command line tool. In particular, I want to automatically process some data from an open-source GitHub project, so one ...
0
votes
1answer
65 views

Continuous Integration for different languages [on hold]

So, I understand Continuous Integration in theory, and have used Beanstalk. However, I've been charged with creating the process at my current PHP shop. My hope was maybe PHPCI, since it looked ...
4
votes
2answers
205 views

Is it better to use strings or int to reference enums outside the java part of the system?

We were having a discussion at my work about the use of enums in Java. A coworker was arguing that when using enums on the server-side, whenever required we should use string to reference to it (for ...
0
votes
0answers
3 views

Cannot find bug in NegaMax implementation for java chess game [migrated]

I am having trouble identifying the error in my negamax implementation. It is not properly assigning the correct score except for ply 0 where it works. Obvious "pawn capture Rook" opportunities are ...
0
votes
1answer
25 views

Best approach to implement an update operation of a container object?

I have an Invoice object wich may contain several FacturedServices objects stord as a list. In may interface, the user can edit an Invoice object, delete add or edit its FacturedServices list. Whe ...
0
votes
0answers
70 views

Dealing with several custom getters

I have a data structure with data units containing different types of data. I've wrapped the data in "Field" objects so that each field is able to independently parse user input in a desired way. ...
-2
votes
0answers
31 views

A library to be able to reproduce mp3 files in Raspberry Pi [on hold]

I've been having a hard time looking for a simple library to reproduce audio files (mp3 precisely) , i've tried pyglet for python, but didn't succeed, but look, the only thing i want/need is a library ...
-1
votes
0answers
51 views

What else can kill a JVM? [on hold]

When A JVM (Java process) dies unexpectedly, it can be an inside job (OutOfMemoryException, or OOME) or it could be from an external stimulus. As far as internal mechanisms go: Any uncaught ...
0
votes
2answers
111 views

When should we work on GC optimiation?

So, I've learnt about how GC works and how can I monitor it via VisualVM, but my question is about why we should ever perform GC optimization? In our web project (JSF/Spring/Hibernate) we haven't ...
-4
votes
1answer
31 views

Field being skipped on use of Scanner .next() method and spaces being left out [on hold]

I have a class called Student containing certain fields and I was using the following details to enter the values in its fields: Scanner s1=new Scanner(System.in); Student[] s=new ...
-5
votes
0answers
58 views

Should I learn Java or Javascript? [on hold]

I am a college graduate living in Southern California with a very basic understanding of java and programming in general. If my goal were to get my first job(or internship) as soon as possible, which ...
-5
votes
0answers
43 views

which language is best to learn [on hold]

i know c,c++,html&css and basic java-script , i want to know that for which next language i should go for? i am totally confuse in ruby,java,php,asp,python,.net which should i start learning?? I ...
-1
votes
0answers
37 views

Persisting state of current execution in Java

I have specific use case, and I'm looking for opinion and suggestions on implementing this in Java as I'm fairly new to this. I have a dependency graph kind of process. The entity E in the processing ...
-2
votes
2answers
126 views

Why public access level method get overridden in java?

This question is raised with a clarification required to decide when to declare a method protected or public during class design of a package. My point is, if one needs to override a method of a ...
0
votes
0answers
26 views

Structure of Input Events [closed]

I know there are KeyListeners, MouseListeners, and AnyListeners everywhere. However, that is on the higher level. I want to know what the base of it all is. The lowest-level you can get ...
0
votes
2answers
153 views

Java card game design decision

I am making an application for a card game, with a standard 52-deck playing card. For now, I am writing a solitaire game with for learning purposes. I've had some experience making platformers and ...
4
votes
3answers
230 views

Why use arg type `class Object` instead of `Comparable[]`?

In the code below, I believe it would look more appropriate to make the method argument be of type Comparable[] instead of Object[]. The first reason it would be more appropriate is that one can be ...
-3
votes
0answers
79 views

What is the use of Runnable r = new Runnable(); [closed]

I have seen this used but I don't know why it is used. Shouldn't the main method be the entrance point in an application?...
0
votes
0answers
44 views

All pair algorithm implementation [closed]

I need to know how to implement all pair algorithm in java... i am newbie for this kind of algorithm implementation .kindly help me with some suggestion. I have to generate possible test cases for ...
-4
votes
0answers
40 views

I need help with creating a very simple slot machine game (newbie student) [closed]

For this assignment you are to create a complete game to emulate a fruit machine (http://en.wikipedia.org/wiki/Slot_machine[1] ). Your machine will use the number 1-7 to represent the outputs on the ...
-4
votes
0answers
112 views

Java and C# is confusing me a lot. Any explanation on the difference between the two? [closed]

I'm new to programming and I'm still confused as to what is the difference between Java and C# and what are the benefits of both and which is better for programming.
0
votes
1answer
104 views

Is it possible to have a keyed dictionary stored on disk? [closed]

for example) would it be possible to be able to use the key of an item to access the item stored in a file out on disk (without searching through the whole file)? I'm looking fora general example of ...
0
votes
1answer
66 views

Matrices calculations on partial shape matching

I'm working in a shape recognition project where it is supposed for me to develop an application that receives two images: an original one and a sketch made by a user. I am supposed to detect contours ...
0
votes
2answers
140 views

Develop GUI and logic in a team the right way? [closed]

I am planning to start a small project with a friend. I will be developing the GUI using JavaFX in the MVC pattern and he will be responsible for the model/logic. My question is: how can we achieve a ...
0
votes
1answer
23 views

Using classes not designed for multiple sessions in servlet

I'm looking for a way to use a collection of Java classes in a servlet, which would provide some services to clients, but the classes were not designed with multiple sessions in mind, which seems to ...
0
votes
1answer
69 views

Can JUnit be used to test this project?

I currently have an interesting situation occurring with my code, and after hacking away at what turned out to be a dead end for the last two weeks, I'm here asking those smarter than I to educate me ...
-2
votes
0answers
20 views

How to retrieve YouTube videos details (Like and Dislike and comments) using YouTube Analytics API in java? [closed]

I studied the YouTube Analytics API. in java Retrieve viewing statistics, popularity metrics, and demographic information for YouTube videos and channels. But I want retrieve video details ...
2
votes
1answer
103 views

Is Singleton enough for a EMailUtil or there is any better implementation? [duplicate]

I am developing an application, where I have to send lots of emails for user account creations, validation, invites etc. I have implemented a static class EMailUtil which has different methods like ...
-2
votes
0answers
53 views

Guava ImmutableListMultimap order by date [closed]

I am developing a program to calculate invoices in given month. Developing the program using guava ImmiutableListMultiMap. Here is my code. public class getQuater { private MultiMap map = null; ...
-1
votes
0answers
46 views

Java - Can't call an Array from a different method [migrated]

I've been a long time lurker, and I've come across a part of my code I cannot figure out even with the help of stackexchange. I can't seem to call an Array from another method of mine. I have a bunch ...
2
votes
1answer
52 views

Creating/updating entity save strategy

Please note: although I'm talking about Java in this question, what I'm asking about here should really be language-agnostic. I am dabbling in OR/M for the first time, and have cooked up the ...
2
votes
0answers
69 views

is there a way to tell JDBC I am about to execute a transaction? [migrated]

when setting AutoCommit to false; is this means that I have to commit after executing every sql command in my application. here is a scenario SQL1 doesn't need to be a transaction. SQL2 needs to ...
0
votes
0answers
33 views

Programmatically extending table/entity definition mappings through aspects in Spring and Hibernate

I would like to know if it is possible to use AOP to extend table/entity definitions so that I can add functionality across the board that requires persistence. Let me explain what I want to do with ...
-2
votes
0answers
48 views

What is the best way to store user uploaded Java files? [duplicate]

I am working on a website where users can upload their own Java files, and we will later compile and execute them. I will address the risks of executing users' code separately, but what would be the ...
2
votes
4answers
215 views

Why is the hashCode method usage of HashSet not specified in the API?

I was trying to debug my code which uses a HashSet and searching through the SO, I found out that I needed to override the hashCode method as well. The strange part is, checking the related API, I did ...
1
vote
2answers
90 views

Improve the speed of a Tomcat Server with MySQL

I'm developing an application with 3 sides, desktop (JavaFX), server (Tomcat) and Android. And a MySQL Database Server. The app receive mails and convert them into tasks. The tasks are sent to the ...
1
vote
1answer
122 views

Creating a calendar/planner program. Confused about OO logic?

I'd like to create a piece of software that has the functionality of a common written planner. To do this, it will have a Calendar. When planning the program, I became confused as to how I would ...
-1
votes
0answers
102 views

How do i wait for all threads in java code here? [migrated]

I would like to compare thread performance on solaris/linux/windows 64 bit JVM's, with the below code. I personally, prefer this style of coding for threading, because you have a method performing ...
0
votes
3answers
167 views

Building a calculator using MVC

I've been programming in Java for about 6 months, and I thought a good and challenging test of my skills would be to build a GUI calculator. I have very recently heard about this MVC idea, and I ...
0
votes
2answers
74 views

Managing multiple JDBC connection

I have an application that connects to databases based on a json string that contains connection information. The json is sent just when the application starts. How do you manage such connection ...
0
votes
1answer
133 views

Is Default Package included in the Package Level Access?

I would like to know how the default package is defined in Java.I know how public and private access is defined but I don't know whether there is any default package access that is defined in package ...
-1
votes
1answer
178 views

Whether Methods could be defined in Constructors in Java? [closed]

I am learning to program in Java and have run into a situation I don't understand. I have this code import java.io.*; class temp { temp() { Finish f=new Finish(); f.end(); } ...
-2
votes
0answers
146 views

Trying to create the simple 24 game in java, I have some code but I need to reverse it [duplicate]

I am trying to create the 24 game in java and I found some code that does what the game is supposed to do. This code give the user 4 numbers and the user then has to put them into an equation to equal ...