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.
1
vote
0answers
83 views
Single write, multiple read of stateful objects
Scenario:
One data input feed (call this Source)
Multiple objects (call these Layer1) read this Source, and analyze the feed. This analysis is stateful.
Layer1 objects have configuration parameters. ...
-3
votes
0answers
28 views
best algorithm to retrieve relationship between each two XML consecutive elements
what's the best algorithm that identifies the relationship between each two consecutive elements throughout the reading of the XML file.
and What's the suitable XML Java API to do this algorithm
...
-3
votes
0answers
185 views
Simple Algorithmic Interview questions? [closed]
I will be taking some interviews for an intern position. And it will be a telephonic phone screen for around 45 minutes.
So I am looking for some simple algorithmic interview questions that I can ask ...
0
votes
0answers
27 views
Java multi catch exceptions errors [migrated]
I've checked this code several times and I cannot figure out why it's spitting back errors in regards to the catch statement. I'm aware that handling multiple exception with one catch clause is ...
1
vote
2answers
142 views
Decimal to 17-bit 2's Complement Signed Number
I am trying to convert decimals, (0.05, -0.28, 25.00, etc), to a 17-bit 2's complement Signed Number. The parameter data I am sending is SysEX Midi Data (to some external Synthesizer). The data ...
0
votes
0answers
59 views
Why is this the case? [migrated]
I was going through an AP Comp Sci practice test and found the following problem:
what is the output of:
System.out.println("1" + new Integer(2) + 3);
(Java)
The answer was
123,
I am confused as ...
-1
votes
1answer
40 views
ASP.net extended with client side operations [closed]
What is the best way to "extend" my ASP skill set to include more client side orientated actions. I am developing the growing need to do things "faster" , without post backs... I am talking about UI ...
0
votes
0answers
41 views
Sonar Performance - Static inner class of Type Token [migrated]
Sonar says "Performance - Could be refactored into a named static inner class The class DataServiceImpl$2 could be refactored into a named static inner class".
paramsClass1.add(new ...
-7
votes
1answer
57 views
Deployment of java web application on internet [closed]
I have developed an web application in java using Apache tomcat server and MS sql database. Its working fine in offline. I want to deploy it online.
Apart from purchasing domain name, how to deploy ...
3
votes
3answers
133 views
Threads or ThreadPool? Fixed or Dynamic ThreadPool?
I have a java program which listens on a port for input. Based on Input, it calls a webservice and then returns a success/failure back to the client program.
I fork a thread for each client ...
6
votes
3answers
176 views
Which of these design patterns is superior?
I find I tend to design class structures where several subclasses have nearly identical functionality, but one piece of it is different. So I write nearly all the code in the abstract class, and then ...
-1
votes
0answers
7 views
java script date popup is not working in firfox [migrated]
The following is the function for date selection. The code is working in IE but it is not working in Firefox. The problem coming at selecting a day.iam not able to select a day in Firefox.
function ...
-2
votes
0answers
89 views
is it possible to write web applications with java fx? [closed]
is it possible to write web applications with java fx? I heard java fx support full java core functionality and have a better media and graphics support
1
vote
5answers
229 views
The need for adding an interface to every class [duplicate]
My coworker and I are arguing very hard about this topic. He's thinking that every single class should have an Interface that the class implements (also Single-Implementations). He uses this design ...
-1
votes
0answers
93 views
which java web framework is similar to php codeigniter framework [closed]
Would you please let me know a good java web framework for a E-Commerce website, right now the existing php website is based on codeigniter framework and I am planing to convert this php project to ...
1
vote
1answer
397 views
Why does gmail use java? Is there really a advantage over something like php or python? [closed]
Note: I know that none of you (probably) work for google, so this is a lot more of a conceptual question.
So yeah, i discovered that Gmail uses java and that got me thinking, Why?
I personally never ...
0
votes
1answer
44 views
Controller JSP - no view
Most people say do not use JSPs. But what if I have a JSP that does not show anything, it only acts as a controller? Why would I do that? Because we do not need to redeploy complete webapp to make a ...
0
votes
1answer
90 views
Abstract methods being used as static methods in java?
In an attempt to write some generic code I find myself putting, in my abstract class, a method that returns some static information about how the class should be treated. This method doesn't use any ...
4
votes
1answer
251 views
Is it possible to write a code without class methods, globals, and class variables? [closed]
I'm designing my own programming language for fun, and I'm thinking of making it fully Object-oriented (no statics, no globals, no class variables, no class methods), so I need to find a way to ...
-3
votes
0answers
156 views
Choose between focus c# or java? I need motivation [closed]
I have a problem for my study, I need to focus on one programming language.
For professional programmers, please give me motivation or the right choice to choose one of them.
0
votes
0answers
80 views
Why isn't this “else” statement working? [migrated]
for (int i = 0; i < charArray.length; i++) {
char temp = charArray[i];
if (temp == ONE || temp == THREE || temp == FIVE) {
stack.push(temp);
} ...
0
votes
0answers
43 views
Categorize websites based on URL [closed]
I am trying to categorize websites based on the URL. I am creating two tables. One of them will contained the URLs captured from the http packets and the other will contain categories such as sports, ...
1
vote
1answer
74 views
Custom Alphabetic Sorting of Array in Java
I have a requirement to read a text file with lines in tag=value format and then output the file with specific tags listed first and the rest sorted alphabetically. The incoming file is randomly ...
-1
votes
0answers
45 views
Having problem on running java code in eclipse [closed]
For java coding I installed eclipse on my machine. It installed and opened properly. For testing I used to run this code
public class Hello_linux{
System.out.println("Hello_linux");
}
But this ...
0
votes
1answer
314 views
Decrement operator difference between C++ and Java? [closed]
Please tell me why the same piece of code behaves differently in C++ and JAVA.
Ok first I implement a function to calculate the factorial of an Int RECURSIVELY
In JAVA:
int f(int x)
{
...
4
votes
3answers
151 views
Looking for a freeware NoSql key-value database to offload a Java HashMap
I have a Java HashMap with a String key and POJO value in a long-running application, and it's taking up a large chunk of memory (over 500mb, and this number is expected to grow - I'm guesstimating ...
0
votes
1answer
185 views
Did I answer this correctly and concisely? [closed]
By email I just answered my brother who is learning computer programming that C++ and Java are more similar than C and C++ even though C++ is nearly a superset of C. Do you agree?
AFAIK Stanley ...
0
votes
0answers
11 views
Splitting string in java containing relational operators [migrated]
Lets say i've a string which 've relational operators,
"x<y , x=y , x<=y , x>y , x>=y"
how can i split this?
if i use [<>=] it'll split x<=y as (x and =y).
is there any simple ...
8
votes
3answers
405 views
Refactoring an existing abstract class and its parameters
I have an abstract class A which declares an abstract method doStuff. Currently there are many classes that inherit from A and implement doStuff.
The class' instances are initialized at run-time ...
1
vote
0answers
18 views
How to manipulate JDBC connection with Service layer [migrated]
I have a Spring MVC App, it works fine, but now I inserted the service pattern and I don't know what is the the best way to treat my JDBC Connection inside my DAO.
I have an interceptor which creates ...
-2
votes
0answers
224 views
Why should CS teachers stop teaching applets? [closed]
Why should CS teachers stop teaching Java applets?
As a veteran of applets and forums, I think it is high time to make a
call that teachers should stop teaching applets in general, & especially
...
1
vote
2answers
103 views
Shift bytes through a fixed sized buffer
I'm writing an InputStream that processes data streams containing "trailer" data. That is, the final n bytes of the stream is a piece of data that must be handled separately and shouldn't be returned ...
1
vote
1answer
24 views
Does JMF have support with Xuggler
i am working on a project consisting of sending and receiving streaming multimedia.So,i have installed JMF, but i have seen that JMF has 32 bit library as mine is 64 bit so i wanted to use Xuggler for ...
1
vote
1answer
69 views
What would be an optimal Java media engine to use for an animation-based game? [closed]
My colleagues and I have been planning on development for a while now, and we're curious as to what we should use to provide media into the game. Everything will be composed of picture-based ...
-1
votes
0answers
31 views
What are the Various channels in Android Application Development? [duplicate]
There is always something new to learn, but the problem for me is in which direction should I explore things. Surely there is a lot to learn about Android, but I feel there also are different wings in ...
-1
votes
3answers
60 views
Best way to create draw with limitation
I'm writing a program to automatically make the draw for a competition. There are four objects: Debate Judge School Team Each Debate has two teams and a judge. Each team participates in three debates. ...
-2
votes
0answers
112 views
How to implement HTTP /1.1Keep-alive feature in my web server [closed]
I am developing my web server. But I don't know how to add HTTP/1.1 Keep alive feature in my code.
My task is
I have to implement file-based multi-threaded web server with
thread-pooling ...
0
votes
0answers
10 views
Mongodb update using Java [migrated]
I need help in updating MONGO DB. here is my document:
Functions : {
"cgi0-app" : {
"calculatedConfigValues" : {
"floor" : 0.0 ,
"ceiling" : 49.0 ,
...
0
votes
0answers
9 views
MVC in Java console, GUI and Android apps [migrated]
I'm trying to make a class project in Java as a console app, GUI app and Android app. Project requierements say it has to be implemented using MVC, so if the teacher quits the View layer from i.e. ...
4
votes
3answers
323 views
Is there a way to use a higher level language in a competition that only has C, C++ and Java by default?
On that competition, you gain access to a system with gcc, vim, emacs and Java. You can't take any file with you and there's no internet access, but you can do whatever you want inside that system. ...
0
votes
1answer
145 views
How to design an application that read files using MVC pattern?
I am going to write an application that reads data from a csv file, and display that data to the user. I intend to apply an MVC design pattern to create this application. A user will interact with ...
1
vote
2answers
152 views
I am new to programming and I am interested in jdbc - Tips and Advice needed [closed]
I am currently acquiring my associates degree in software engineering. I have been told in order to be successful in a computer science field you have to specialized in something. After researching ...
1
vote
2answers
124 views
Type parameterized methods to avoid casting
In a library I am developing I have a factory method that looks a bit like:
public <T> T instantiate(Type targetType) {
return ...;
}
I am using a type parameterized method to avoid that ...
-1
votes
0answers
58 views
How to disable java RMI Threads? [closed]
I traced java vm and see in all java application, there is at least 5 active threads are about RMI.
I want to disable RMI. how can i disable it?
RMI TCP Connection(2)
RMI TCP Connection(1)
RMI TCP ...
23
votes
8answers
2k views
Is the algorithm more important than the programming language?
During the current (2013) Google Code Jam contest, there was a problem that took C++ and Java people 200+ lines of code as compared to Python people that solved the same problem only using 40 lines of ...
1
vote
0answers
97 views
Java blocking on multiple queues [migrated]
I'm not a very experienced Java programmer, so forgive me if this is a bit of a newbie question.
I'm designing a system that consists broadly of 3 modules. A client, a server and an application. ...
0
votes
0answers
36 views
How to print a cheque through the receipt printer in Java? [migrated]
I have pos58 receipt printer(printer made in China), this printer supports ESC-POS Commands.
I want to print out a cheque in Java without JavaPos api. Just I don't know how do this.
Is there some ...
0
votes
0answers
10 views
ScrollView Height does not wrap onto parent activity in code [migrated]
I have this little problem regarding layout with scroll view on my android code
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import ...
4
votes
3answers
247 views
HTML code in Java class
A conceptual question, I tried to google but couldn't find any definitive answers, so here it goes:
Is it a good practice to write Java methods to return HTML strings that will be returned to the ...
-2
votes
0answers
28 views
Need to table to say a custom error I get from a data base when there is an invalivd search [closed]
When a search is ran if there are no results a "No results found" line is added to the table. When a invalid search is ran such as a user searching for a fake country. I need to access the label ...






