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

-1
votes
0answers
16 views

CMS-based ecommerce/delivery site

Is it secured to create a Wordpress-based CMS site catered to ecommerce, would you recommend any CMS that can fulfill this task? e.g Joomla, Drupal. Should I just pay someone to create this ...
0
votes
2answers
32 views

Can I use a package visible constructor for creation?

I need a class where this can be done: // user program elder_tales.Player p = elder_tales.generate_player(); elder_tales.level_up_player( p ); but not: // user program elder_tales.Player p = new ...
0
votes
2answers
227 views

Just one class - Java

I've written a program in Java, it's only fairly small and I started programming and ended up just building one big class with everything inside it. The program works fine and exactly how I wanted it ...
13
votes
5answers
2k views

How another popular language would avoid having to use factory pattern while managing similar complexity as in Java/JEE?

Factory pattern (or atleast the use of FactoryFactory..) is the butt of many jokes, like here. Apart from having verbose and "creative" names like ...
0
votes
0answers
95 views

How can I re-use object from another project?

I have a first project has a feature to viewing, inserting and updating an employee record, with this possibly I will create a java class for the UI and another for the database connection with ...
-4
votes
0answers
68 views

What to do when confused on game programming [on hold]

I spend needless hours trying to understand but fail. I've tried on my own which helped but then I learned about game loop and such. is there a good youtube tutorial online that is best to follow? I ...
2
votes
3answers
205 views

Inheritance: Is code from superclass virtually *copied* to subclass, or is it *referred-to by subclass*?

Class Sub is a subclass of class Sup. What does that mean practically? Or in other words, what is the practical meaning of "inheritance"? Option 1: The code from Sup is virtually copied to Sub. (as ...
-2
votes
0answers
23 views

html fieldset equivalent in java [on hold]

does the html fieldset tag have a java equivalent?
0
votes
3answers
152 views

Finding the name of a video game with a picture of its cover (Python/Java)

For the past few days, I've been trying to figure out how to take an image of a video game cover (like this one) and get the name of the game from it. Initially I attempted to use Google's Search by ...
0
votes
0answers
26 views

Realtime data transport architecture [on hold]

my first post here, so be gentle. <3 I have a concept of a game system that includes (preferably) Java server and multi-platform clients (Web, Android, iOS). This is a 1vs1 player-vs-player ...
-2
votes
0answers
20 views

French characters issue ServletFileUpload java [on hold]

I am trying to fetch the value from TextArea with max 500 characters. But I am facing a problem with French characters where each special character is replaced by 4 characters. As a consequence if I ...
2
votes
2answers
95 views

Design Hash table with simple hash function

I want to learn to Design Hash table with simple hash function for better understanding. I understand that the hash table will work as long as the hash function maps each key to a non-negative integer ...
0
votes
0answers
49 views

2D Game Data Structure in OpenGL ES 2.0

I'm trying to come up with some data structures for rendering my map on OpenGL. It is going to be ~ 100x100 blocks(squares) total, with each block being around 100 pixels. However, the screen will ...
4
votes
3answers
435 views

What is the process of determining which method in a class hierarchy should execute known as?

I thought I understood inheritance and polymorphism, but I was given this question, and I can't, for the life of me, figure out what the proper answer is or what they're trying to get at: The ...
-7
votes
0answers
24 views

Help for that UDP [on hold]

Write two Java classes, which we call Client and Server, according to the specification below. The two programmes use the UDP protocol. Roughly speaking, the client reads an integer number n from the ...
-3
votes
0answers
87 views

Switch career from Java to big data - confused :/ [on hold]

I need some information to take a decision which matters a lot to me. I know this is a bit lengthy and I request you to read through it. Currently I am working as an application developer with the ...
0
votes
0answers
19 views

Suggestion to Design API Centric Application using Appengine

I have been planning to create an new application. So I was designing the application structure.i know this application will be accessed form multiple devices and the app feature will be increased. ...
-1
votes
0answers
10 views

Automated Testing Tools in Java for desktop application [on hold]

I want to write automated tests on Java for functional testing of windows GUI application written in Delphi7. I did automation testing of web applications (Java + Selenium WebDriver) but never deals ...
-2
votes
1answer
131 views

Should I use any Java framework to create a REST API server passing JSONs back and forth? [on hold]

I'm new to Java Servlets and I want to build an application using Tomcat which will basically be a RESTful data management application with no HTML part. So, it will accept GET/POST requests, do some ...
-7
votes
1answer
62 views

How are constructors getting executed in this code snippet? [on hold]

I am not invoking any constructor. How are they getting executed? I have only called constructor of class C. import java.lang.*; class A{ A(){ System.out.println("INSIDE CLASS A"); ...
-2
votes
1answer
27 views

Count word in JTextArea [on hold]

How can I count the words in the JTextArea and how can I print the ans of the int variable containing the word count to another TextArea. import java.awt.BorderLayout; import ...
0
votes
0answers
5 views

Arraylist - Resort Rental [migrated]

When the user enter the id and resort code, how can i search in the arraylist and get the array number that the id and resort code store in? using For-Loop. for(Person pe: guestList) { if ( ...
0
votes
0answers
20 views

how to separate the logic of different views when using android viewFlipper?

I use a ViewFlipper in a dialog. I want to fetch the data from the EditText in both of them and also add click listeners to both of them. I can write the whole code in one big file, but i want to ...
-5
votes
0answers
29 views

why Cannot create XmlPullParser? [on hold]

I am trying to convert from xml file that i created back to Object. I am using XStream to do that as you see below... XStream xstream = new XStream(); xstream.alias("Model", Model.class); String xml ...
-1
votes
0answers
55 views

Java: Singleton Event Driven Design [on hold]

I have a singleton class ( I make this as immutable ). This class is present in the base module. It has a static method getInstance() which will initialize a new object based on the data stored in a ...
1
vote
0answers
64 views

Should I assert in packages?

I have read a few asserts vs exception questions already; I ask specifically about package visible classes though. When you write a package, the classes marked with "public" are exposed to the ...
0
votes
3answers
142 views

Better creating a class with static methods or a object? [closed]

I have a class,, and it has 2 methods. I will use those methods just once , but i would like to know (in term of memory )would it be better to create a object(just once) and use the methods or make ...
-1
votes
0answers
58 views

Starting off Game Development from…where? [closed]

Does the gaming development community here have any suggestions for future game developers on how to begin programming ... games? I personally would think people would start off with 2D then start 3D ...
2
votes
3answers
107 views

Simple Design for Singleton function in java for Kernel [on hold]

I understand that Singelton helps to instantiate only one class AT A TIME. I try to learn how to Design for Singleton function in java. I want to know it better to understand Kernel. So I try to do ...
-5
votes
0answers
36 views

What technologies do modern java web developers use? [closed]

I am specifically looking at rapid development technologies(You know what i mean). Would like to know the different tools/technologies used in developing a website/webapp.
1
vote
3answers
93 views

Empty superclass for Collection of derived classes

Basically, what I would like to obtain is a way to iterate through ONE list, and call methods specific to the interface the objects in the collection implement. In my Java project, it would result in ...
0
votes
0answers
138 views

Is this the most efficient way to write this method? [migrated]

Newbie here, I'm writing a method that will compare two objects that store time. I wrote this: public boolean isBefore(TimeType secondTime) { if (_hour < secondTime._hour) { ...
-3
votes
0answers
18 views

JSP page - In a table <TD><input type = text name = “code”></TD> [migrated]

I have created a JSP page with a table containing two columns Code and Description ,the table data is input type="text" name ="code", the functionality which i have to implement is,if i type the ...
-3
votes
0answers
86 views

Lack of curly braces in java collections framework [closed]

It's considered to be a good practice to use curly braces in one line if-else statements. But when I look into Java collections framework I see lack of them here and there all the time. Doesn't its ...
-1
votes
2answers
72 views

Write Java program that gets HTML source for two or more Web pages, parses sources to find price info, prints prices that are found [closed]

So I have to write a java program that gets HTML source for two or more web pages, parses the sources to find price information, and then prints the prices into the console window. Then I have to save ...
-3
votes
1answer
134 views

Are certifications worth for starting programmers? [closed]

Just in case (Are certifications worth it?) I'm kind of making more specific the question in the link above. I know the answers that were posted about it. Now, I know true experience is unbeatable. ...
-1
votes
1answer
57 views

Is it correct to extend a bean class and write a class which holds logic to populate the bean we extend [closed]

I need to extract some metrics from ManagedBeans and store the collected metrics in an object bean. The object bean is defined with member variables to hold the metrics. In this case, is it right to ...
-2
votes
0answers
37 views

What is better for opencv? C++ or Java? [closed]

In terms of speed, ease, applicability, and so on; which has the most potential of the two? From a scalability factor, I don't want something that has boundaries or will cease from lack of support ...
2
votes
5answers
328 views

how to design a stack without using java library or using list

I have a question how to design a stack without using list or array? This is one question that I want to think about as I want to better understand stack.
-2
votes
2answers
265 views

Why are there so many Java applications that are development-related, and so few Desktop applications? [closed]

I'm a beginner-intermediate Java programmer. Currently interested mostly in developing GUI Desktop applications and games. I wanted to look at some other people's code, so I searched for Java open ...
1
vote
0answers
95 views

What are the practical applications of nashorn [closed]

Oracle is putting a lot of effort into supporting Javascript on JVM. Rhino was quite capable as a JS engine, yet Oracle saw the need to create Nashorn and optimize it extensively to match V8's ...
-1
votes
1answer
62 views

Should I label class diagram variables as private or public?

In my program, I have several class variables whose access specifier is known as private package. The default accessor specifier in Java is known as private package where it is accessible within the ...
0
votes
1answer
145 views

My UML class diagram is too complicated, what should I do?

Classes have 10-20 links with one another and you can't see anything in that mess of a diagram Unfortunately we finished coding already and if we change the class diagram we have to redo the whole ...
0
votes
1answer
114 views

Generics list without generics

I am using a very primitive Java that doesn't have Generics, and also I can't use reflection. I want to create a generic list so it would be typed safe (i.e. I only have a list that contains Objects ...
1
vote
2answers
152 views

What's the difference of an object being final and an object being immutable in java?

final String str = "do not change me"; str = "why not?"; //it will result in compile time error saying that final fields can not be re-assigned once created i.e. the reference cannot be changed ...
4
votes
1answer
152 views

Why is Java 7's new file API usage still so scarce? [closed]

I don't even know whether this is the correct StackExchange site to ask such a question but here it is... I principally lurk on StackOverflow; and I am frankly flabbergasted by the number of ...
0
votes
0answers
53 views

Rich console UI

There are bunch of console programs and especially games using full redraw (not sure ho this correctly named) of console window. For example, look at output of linux top program -> ...
0
votes
1answer
73 views

Can a Java interface declaration enforce parameter properties?

As far as I know, declaring an interface is like so: public interface Roots_Squares { public double square_root( double value ); } Now... how do you enforce value to have non-negative values? ...
1
vote
1answer
144 views

Java code quality in methods calling methods

I am currently working with an "interesting" code-base and see the following type of thing alot in the code. public Object doSomething() { Object obj = new Object(); // Do some stuff to the ...
0
votes
0answers
7 views

running javascript in java (compiler verion 1.4) [migrated]

quick question - 30 minutes of google yielded no good results. I am trying to run a .js file from my java application and i understand I can use the library javax.script. However, although there ...