Java (not to be confused with JavaScript) is an object-oriented language and runtime environment (JRE). Java programs are compiled to bytecode and run in a virtual machine (JVM).

learn more… | top users | synonyms (6) | java jobs

0
votes
0answers
2 views

Design Pattern to track partial results of a complex process

I'm facing a programming problem that I don't know how to solve in a object oriented and flexible way. I have in mind some bad solutions, but I'm searching for a good one. I develop in Java, so I ...
0
votes
0answers
4 views

More Efficient Solution - Three Nested FOR Loops (Java)

I was wondering if there is a more efficient solution to this problem (some of the variable names have been changed): for (Object obj: o){ //set the display part to obj //get all of the items ...
0
votes
0answers
2 views

Facebook Java API other than restfb?

Hi I am using facebook login for my website. RestFB is convenient to develop however it is really slow when I execute the below code friends = facebookClient.fetchConnection("me/friends", ...
0
votes
1answer
10 views

Optimal storage engine for simple key/value database

I'm trying to decide on the best engine for a database to store our game objects. I've been trying to find various information on the different table engines, but so far haven't found much that would ...
0
votes
3answers
27 views

How to use String.startWith(..) to ignore leading whitespace?

Let's say I have the following that start with "needle", ignoring leading whitespace: String haystack = "needle#####^&%#$^%..."; String haystackWithSpace = " needle******!@@#!@@%@%!$..."; I ...
0
votes
1answer
26 views

How to split a string into tokens?

I'm looking to split a string into tokens but I'm having a hard time in certain cases were the value of a key is empty. Here is an example of the string data: keyItem1="super data" keyItem2="" ...
0
votes
0answers
6 views

Null Autowired Fields

Im currently trying to set up my server to use jersey, spring and hibernate on tomcat. At the moment the project builds with maven and it builds and deploys on tomcat. When I run in debug mode and ...
0
votes
1answer
7 views

Can't find gl_MultiTexCoord0 replacement

I'm making an OpenGL game with LWJGL and just implemented successfully vertex attributes along with VBO's, my problem now is that I have a small UI that is based on slick-util and it doesn't render ...
0
votes
0answers
19 views

Unicode null and JSON

I have a JSON object that when serialized gets the null Unicode character. (The character is coming from a database.) I can replace the character through java but it seems slightly hackish to look for ...
0
votes
0answers
9 views

How do you return multiple types from calling a new instance of a class?

From calling a new instance of the class package main; public class Word implements EditableTokenInterface{ String token, tokenreadonly; public Word(String input){ token = input; ...
0
votes
1answer
32 views

Cannot find symbol error for Integer.parseInt()

I'm getting an error in the following code: import java.io.*; import java.util.*; public class Exercise1 { public static void main (String[] args) throws IOException { Scanner kbd = ...
0
votes
0answers
9 views

How to play audio one after another

What's the best way to play a set amount of audio files one after another. I currently have it set up so that each audio has it's own mediaplayer which is created and started within the previous ...
0
votes
1answer
12 views

Defining my own immutable array in Java

I know that declaring an array final does not make it immutable. I can however define a wrapper class that functions like an immutable array, e.g. public class ImmutableIntArray { private int[] ...
-6
votes
0answers
34 views

I just started a programming class and would like to see an example of what my teacher is asking. [on hold]

Calculate the circumference and area of a circle. Ask for a radius from keyboard input with a nice prompt (see sample prompt below) radius must be declared as 'double': double radius; How do you read ...
0
votes
1answer
20 views

Attributes: @property for Java

Is there an @property attribute in Java like there is in Objective-C? If there were, could I name the object, then access it's properties through objectName.propertyName? Thanks.

15 30 50 per page