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
0answers
10 views

Simple encryption using key

I want to encrypt the contents of a .txt file using NetBeans. This would involve reading the file, changing the characters and writing to another file. However, I want to achieve the encryption using ...
0
votes
1answer
58 views

What are the benefits of using coding? [on hold]

I am completely new to coding java... and I was asked to give a small presentation about coding. I just would like to ask why is coding good? I know I could search it on the internet but so far i ...
0
votes
1answer
28 views

Where to go after learning basic Java? - Objects First With Java [on hold]

So I've taken a basic college course in Java. Before this I was completely knew to programming, but was always and still am eager to learn it. We used the book Objects First With Java, 5th Edition, ...
0
votes
1answer
36 views

How do you name the Visitor implementation?

I was reading about Visitor pattern and was a little wondering about naming of the methods. Assume we have the implementation of the pattern as follows: public interface Entity{ public void ...
-2
votes
0answers
40 views

How to become Java developer.()() [on hold]

HI im very very interested in java. I want to become a java developer. I cant join any institution because of my financial problems. Help me how i can become a java developer and what subjects should ...
1
vote
2answers
59 views

Split one big class on sub-classes

I have a generic question and I don't understand how create what I want. I writing a basic program they can access to one database an do some SQL request, etc. But at the moment I have one big class ...
-5
votes
0answers
33 views

C and Java Programmar [on hold]

I am currently pursuing computer science in college. 1)I want to be a professional C and Java J2SE Developer...(not only a programmar)...so that I can develop system softwares,customize linux shell ...
0
votes
1answer
87 views

Elegant way to count the number of files in Zip archive

I need to count the number of files in several zip archives for error checking. I've found several answers on SO but nothing elegant. I currently have the following code which works but it's not ...
-2
votes
0answers
27 views

WebService in Java - why code does not execute? [on hold]

Here is my sample code. It does barcodes scanning. Function sendJson should call webService. Code runs but in Apache log I see NOTHING. For some reason web service is not called. What I'm doing wrong? ...
-4
votes
0answers
63 views

What do you think about a CMS similar to WordPress but implemented in Java? [on hold]

I am a Java developer and I am also interestest in WordPress CMS (it is a very popular PHP product, I think that all know it) website development. In this time I am working in Java on LifeRay webapp. ...
0
votes
0answers
49 views

Why use logstash with elasticsearch? Any advantage [on hold]

Recently i am working on generating a report using kibana and elasticsearch. Is there any advantage of using logstash to send data to elasticsearch over sending it directly? Gone through a few blogs ...
1
vote
2answers
69 views

best practices for packaging in Scala projects?

Scala runs on the JVM, but that doesn't mean we have to write it like Java. Eclipse discourages use of the default package. What are some considerations (e.g. size of project) that determine how ...
-3
votes
0answers
51 views

Has anybody found a way around new Java applet security in local area networks? [on hold]

I have an M2M network within a local area set of IP addresses (192.168.xxx.xxx) and I cannot let users access anything within, except through a browser. For that I need an applet and now I find all ...
1
vote
0answers
10 views

How to loop through array bidimensional in diagonal according to a position in degrees

The title could be no self-explanatory enough but I need some conceptual help in order to implement a solution to go through an array: I'm developing a program to calculate the "most shadepath" route ...
46
votes
5answers
5k views

What exactly makes the Haskell type system so revered (vs say, Java)?

I'm starting to learn Haskell. I'm very new it and am just reading through a couple of the online books to get my head around its basic constructs. One of the 'memes' that people familiar with it ...
-2
votes
0answers
32 views

Java Ascii Table [on hold]

so I'm having trouble creating a table that is used for a game. It needs to have 3 Human charaters (@), 2 Monsters (#), 3 Treasure Chests (*) and 4 Obstacles (O). The table needs to be 10 by 10 ...
0
votes
1answer
59 views

Converting from byte[ ] to user defined type

I am working on a network simulator designed in java with the basic function of routing messages through a network. I am trying to take a Message object, encrypt it using an encryption utility that ...
0
votes
0answers
25 views

Can't figure out how to parallelize the calculation of the amount of offspring expected for species in genetic algorithm

I developed a genetic algorithm in java 8 taking advantage of its reasonably free parallelism opportunities with Streams. As you are likely aware, running the epochs takes its time for even a test ...
1
vote
1answer
65 views

Internationalization on a service layer of an application

My specific problem is how to handle internationalization of specific messages from an architecture layer that is not the view layer(e.g service layer). I've created an architecture based on ...
-2
votes
0answers
25 views

Fix java.lang.NullPointerException? .setColor(c) [on hold]

Code: JPanel randomPreview; {..} **66-70** public void showPreview(int pX, int pY, int pCol, JPanel pPanel) { Graphics g = pPanel.getGraphics(); Color c = new Color(pCol, pCol, pCol); ...
-5
votes
0answers
24 views

Logical error help [on hold]

Sorry for the title, I'e been trying to get this program working for a while and it really beats me as to why I can't seem to get it work as I want so here's my whole code: import java.util.Scanner; ...
-2
votes
0answers
141 views

Why do C based languages use a colon for the case's? [on hold]

Why is a colon used at all? For example: switch( c ) { case 'A': CapitalA++; case 'a': SmallA++; default : total++; } Instead of: switch (c) case 'A' ...
-2
votes
0answers
16 views

JComboBox to auto suggest in java se [migrated]

I want to know how to get an JComboBox to auto suggest the elements when we type in the combo box. For an example, If I had loaded a JComboBox with these names using MySQL, [Amila, Nimila, Nikila, ...
-3
votes
0answers
8 views

I am getting org.hibernte.InvalidMappingException: unable to read xml when i try to run my program [migrated]

I am a beginner to Hibernate and cannot understand in which part of my program I have made an error. Can anyone please tell what may cause this type of error : org.hibernte.InvalidMappingException: ...
0
votes
0answers
123 views

How to web scrape [on hold]

So I am using a raspberry Pi for displaying calls to our fire department on a big screen. It works great but I want to customize the display. Currently, it takes the information from a webpage that is ...
-3
votes
0answers
23 views

Which platform i can use to develop a VNC server between JCreator, Net Beans and Eclipse? [on hold]

I would like the develop a VNC server that will allow the remote connection of two computers located in different locations and connected in different networks.
-1
votes
1answer
59 views

Withdrawal and bank balance in banking system [on hold]

I am making an online banking system(codes can be provided if necessary), my problem is with getting the balance of an account and withdrawal. How can i design this into the system, I can allow the ...
-2
votes
0answers
44 views

How to make java games [on hold]

hi I am a student in IT (Multimedia Programming). I am new here in this website and really I like it very much . my question is ( I will make game about hidden objects by using (java eclipse) , so I ...
0
votes
1answer
29 views

How do I effectively test, and log, network status with a Java Application?

I want to write an application (in Java) that basically detects when I lose my internet connection, and then log the time. To make things more challenging, I'd like to figure out the point of failure. ...
-4
votes
0answers
18 views

Confused to select the domain [on hold]

Everyone please suggest me what to do for my following questions: 1. I have done course in java and know basic fundamentals, unfortunately i have not yet get an opportunity in java. So should i wait ...
1
vote
0answers
52 views

Finding the closest n points to any arbitrary point in two dimensions (r-tree, quadtree, spatial index)

I have a distribution of two dimensional point objects. How is it possible to find the nearest N number of points to any given point without iterating over the entire collection of points (and only ...
0
votes
1answer
60 views

Serialization - can the output from a serializer be modified and then de-serialized

I am trying to serialize a Message object using ObjectOutputStream ,take the byte[ ] output of the serializer,encrypt it using an encryption tool and then trying to de-serialize it and cast it as an ...
-3
votes
0answers
42 views

am i ready to develop for android? [closed]

hey guys i've been studying java a lot recently so i can design my app and i want to know if my knowledge so far will suffice? i'm far familiar w/ the basics (data types, conventions, etc...) i'm ...
-2
votes
0answers
53 views

How to map the API Version in the JAVA Source code? [closed]

I am using Restlet FrameWork. I can able to pass the version in the Rest API as a header. Example : http://localhost:8080/example.com/ping In header: Version : 1 And I received in my code using ...
-2
votes
0answers
18 views

SOAPHeaderElement removeNamespaceDeclaration [closed]

How I can remove namespace from header . <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ...
1
vote
1answer
90 views

How can I find what Resources a Java EE container provides?

How can I find what "Resources" a Java EE container provides? Can I discover this programmatically, or is there documentation I should refer to? (Note that the Java EE tutorial is vague on this ...
0
votes
0answers
14 views

Arrow pointing towards location in conjunction with distance from location [closed]

I'm currently writing an Android Application in Eclipse in which I need to direct the user from their current point to another point (determined by an algorithm). In order to do this I'm using an ...
0
votes
0answers
43 views

Materializing Java Swing JComboBox [closed]

Java Swing was developed in late 90s, since then UI design has come a long way. Now, Material Design is all over the place. I am curious, can Java Swing components be materialized according to Google ...
2
votes
4answers
247 views

“One of some”-type

Say that you have some different classes that does not really have any functionality in common, but somewhere in your program, you need one of them (which one is not necessarily important) because ...
-2
votes
0answers
21 views

create an association in the Default Programs control panel [closed]

I make a rar application.exe in netbeans , and I put it in context menu using regedit (shell) , when i click on it in context menu this message appear : "this file does not have associated with it for ...
-4
votes
0answers
39 views

GUI and the logic [closed]

DISCLAIMER:- The following example is highly scaled downed version of what I am trying to do in reality. Overview: • Application name: Random number generator. • Desired application flow: The ...
0
votes
0answers
81 views

Java server side : Is this a good design/layered approach? [on hold]

We are in the process of designing an application using AngularJS, RESTful service (Jersey) and JPA for CRUD operations.The RESTful layer might call other external services to get data. There could be ...
0
votes
0answers
23 views

Is this code Clean, Effective and SOLID? [migrated]

I've recently read the books Clean Code and Effective Java. I am a huge fan of Object-Oriented Java. I am trying to write as professionally as possible. I have been an Android Developer for 20 months ...
1
vote
2answers
30 views

Testing code in Java that is only loosely defined

My question is about testing in general. At school, professors say that testing has to be written before we begin to write some code. I guess we need to use EasyMock to represent the classes not ...
-5
votes
1answer
58 views

Extends a class and have its method called automatically [closed]

I have a starting class that extends a class that initializes it. It doesn't seem to call any of the initilalization code though. Basically I have this core class: public class blender { public ...
2
votes
1answer
91 views

Is it OK to deprecate methods that need to be public due to the packaging model but are not to be used outside the codebase in Java?

I am currently working on a semi-large project that has several packages. There are 3 main packages, a "client" package, a "server" package and a "common" package. There are two jars, one for the ...
5
votes
3answers
179 views

Is it conventional to name final/constant local variables in UPPER_SNAKE_CASE?

Pretty simple, I have a method: public final void myMethod(User user, Group group) { final int MAX_USERS_PER_GROUP = group.getMaxUsersPerGroup(); int usersInGroup = 0; // Get users in ...
3
votes
1answer
129 views

Recursively parse without resorting to ugly design patterns

I'm currently building a crochet pattern parser in Java, and I've hit upon some trouble. I'll call the language used for input Crochet Pattern Code (CPC). I have a rather large writeup on the ...
2
votes
0answers
62 views

Fixing years of bad coding [duplicate]

Last year I got my first job with an I.T. company developing industrial Android applications. Unfortunately, when I got there and started working with the code base I was repeatedly confronted with ...
-5
votes
0answers
66 views

Breaking out of an for statement in Java [migrated]

If i do something like this boolean ret; for(int i = 2;i<30;i++) { if ( 30%i == 0){ ret = true; } else { ret = false; } } ret becomes true allready at 2, but also at 5,10 15, is ...