Tagged Questions
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.
-3
votes
1answer
27 views
Populating Data to An ArrayList [on hold]
I I want to add this data to an ArrayList using java how do I do that? Anymhelp would be appreciated
-2
votes
0answers
39 views
GUI Java applicaton advice [on hold]
I have java application for calculate parameters for some kind sensor networks. I need now to make a proper GUI for app. First I need to make GUI to insert input in Application, for example insert ...
-3
votes
0answers
36 views
Standard Java Coding questions [on hold]
I need some standard java coding question, i tried to search these on google but could not find much more java question.
please does anybody has some standard java coding questions.
please don't mind ...
0
votes
1answer
35 views
Is java.util.prefs.Preferences appropriate for accessing changes in state that need to be immediately accessed during runtime?
In my application, I'm currently creating a single instance of a UserPrefs object at startup, then passing a reference to that object to multiple other objects through their constructors.
I am doing ...
-6
votes
0answers
41 views
What am I doing wrong in this method? [on hold]
I have been working on this project for two weeks. I've been going over my code and putting System.out.println everyone to narrow down my error. I've changed multiple things and I've been trying to ...
-2
votes
0answers
16 views
How to connect to sql server in remote location in java [on hold]
using eclipse how can i connect sql server which is in remote location using Java ??
is there any possible way to fulfill the above requirment ?
please tell me all the details like where to keep user ...
13
votes
2answers
1k views
How to improve upon Bloch's Builder Pattern, to make it more appropriate for use in classes that may be extended and sub-extended many times over?
I have been greatly influenced by Joshua Bloch's Effective Java book (2nd edition), probably more so than with any programming book I've read. In particular, his Builder Pattern (item 2) has had the ...
-4
votes
1answer
44 views
Logic Error in Finding the Two Highest Scores [on hold]
I'm doing this for practice, and an example of the logic error is below (the second highest score should be 1 and belong to A):
Enter # of students: 2
Enter a student's name: A
Enter A's score: 1
...
-3
votes
1answer
71 views
Physics Engine with Fixed-Point Positions [on hold]
Fixed-point object locations allow for worlds which are much more scale-able. Using a 64-bit integer (per dimension), and 0.1 millimeter precision, a world can be created which is 100% numerically ...
-2
votes
0answers
30 views
Kafka High Level Consumer Fetch All Messages From Topic Using Java API (Equivalent to --from-beginning) [on hold]
Kafka High Level Consumer Fetch All Messages From Topic Using Java API (Equivalent to --from-beginning)
I am testing the Kafka High Level Consumer using the ConsumerGroupExample code from the Kafka ...
1
vote
0answers
113 views
Guessing a phone number's country code
This is the problem I'm working with: given a phone number from anywhere in the world and some location information (state, province, possibly country name if I'm lucky, etc.), return the ISO country ...
1
vote
1answer
78 views
How does Java handle cyclic data references when serializing an object? [duplicate]
As an assignment question, I am asked to answer the following:
How are cycles handled? Where does the term graph come from?
In the examples given, there does not appear to be any clear trick ...
0
votes
0answers
10 views
What's wrong with this code? I am getting Exception in thread “main” java.lang.NullPointerException at DbConnection.main(DbConnection.java:18) [migrated]
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DbConnection {
...
4
votes
4answers
269 views
Choosing value in SQL query vs (Java) code
I need to choose one of three values of an integer using the value of a column on a nullable column of a table.
There are at least two approaches: 1) use SQL to do all the work: test null values, and ...
1
vote
3answers
393 views
Why is BigDecimal the best data type for currency? [duplicate]
I was reading this question and the accepted answer says that BigDecimal is the best type for representing currency values. I've also seen several other questions support the use of big decimal.
Why ...