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

-8
votes
0answers
53 views

I want to move PHP to JAVA ,How will i do it? [on hold]

I am working on PHP Framework now.I am 23 old . I will have 2 years of experience by 2016.And Company Bond will be over ,and i will be able to leave the company. I worked on ...
3
votes
1answer
186 views

How to get JMS to front end

I currently have a web application and I would like to add a messaging feature to it. In order to do that, I use JMS(actually OpenMQ, the implementation provided with Glassfish 3). The problem is that ...
-2
votes
0answers
26 views

Capturing client request headers (complete) along with IP address information? [on hold]

I want to write client request to a file with two things/information headers ip address The code I'm testing on free hosting service.Code is <? $headers= apache_request_headers(); foreach ...
0
votes
1answer
507 views

Accessing a Web Service: Learning Resource needed [on hold]

I have been searching for resources to learn (Java) Web Services. Although I have found a lot of resources and tutorials on JWS, I am confused with the version numbers, the abbreviations and Metro. ...
1
vote
1answer
250 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 ...
0
votes
4answers
2k views

What encoding is used by javax.xml.transform.Transformer?

Please can you answer a couple of questions based on the code below (excludes the try/catch blocks), which transforms input XML and XSL files into an output XSL-FO file: File xslFile = new ...
-2
votes
0answers
22 views

CMS-based ecommerce/delivery site [on hold]

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
42 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 ...
4
votes
3answers
455 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 ...
0
votes
2answers
250 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 ...
16
votes
5answers
3k 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
102 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 ...
2
votes
3answers
218 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
27 views

html fieldset equivalent in java [on hold]

does the html fieldset tag have a java equivalent?
-4
votes
0answers
73 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 ...
-1
votes
3answers
162 views

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

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 ...
32
votes
3answers
1k views

Does Java development typically involve more subclassing than C#/.NET?

I've recently started looking at Android development. This has brought me back into the world of Java software development. The last time I worked with Java, I'll admit, I didn't understand OOP nearly ...
2
votes
2answers
103 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
50 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 ...
3
votes
6answers
690 views

In Java, would you sacrifice type safety for a nicer programming interface

When and why would you generally sacrifice typesafety for a nicer programming interface? Let me give you an example: if you had the choice between two event aggregators, which one would you prefer ...
0
votes
1answer
192 views

Emulation of MMU accessing the contents of the registers

I'm having a play around with emulating a simple old CPU. I've set the structure up, so far anyway, as follows: The device is the main and creates an instance of the CPU. The CPU then creates ...
-7
votes
0answers
33 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
2answers
354 views

Reason for a reflection error

I’m working on an Eclipse plug-in project. Using this plug-in, users can create Eclipse Java projects with some specificities. For example, they can add Java classes’ names which will be saved in a ...
-2
votes
1answer
134 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 ...
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. ...
-3
votes
0answers
90 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 ...
78
votes
15answers
7k views

Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?

The new keyword in languages like Java, Javascript, and C# creates a new instance of a class. This syntax seems to have been inherited from C++, where new is used specifically to allocate a new ...
-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 ...
15
votes
9answers
13k views

Why should I declare a class as an abstract class?

I know the syntax, rules applied to abstract class and I want know usage of an abstract class Abstract class can not be instantiated directly but can be extended by other class What is the ...
-7
votes
1answer
66 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
29 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 ...
3
votes
1answer
204 views

Hadoop and Object Reuse, Why?

In Hadoop, objects passed to reducers are reused. This is extremely surprising and hard to track down if you're not expecting it. Furthermore, the original tracker for this "feature" doesn't offer any ...
-5
votes
0answers
32 views

why Cannot create XmlPullParser? [closed]

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 ...
8
votes
3answers
368 views

Which classes should be autowired by Spring (when to use dependency injection)?

I have been using Dependency Injection in Spring for some time now, and I understand how it works and what are some pros and cons of using it. However, when I'm creating a new class I often wonder - ...
2
votes
5answers
330 views

how to design a stack without using java library or using list [on hold]

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.
-1
votes
0answers
57 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 ...
2
votes
3answers
107 views

Simple Design for Singleton function in java for Kernel [closed]

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 ...
7
votes
2answers
587 views

When will java change to 64bit addressing and how can we get there faster? [closed]

Having to work with large files now, I would like to know when the java libraries will start switching to long for indexing in their methods. From Inputstreams read(byte[] b, int off, int len) - ...
1
vote
0answers
73 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 ...
3
votes
2answers
422 views

Is Java easy decompilation a factor worth considering

We are considering the programming language for a desktop application with extended GUI use (tables, windows) and heavy database use. We considered Java for use however the fact that it can be ...
0
votes
3answers
144 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
60 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 ...
-5
votes
0answers
37 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 ...
-1
votes
2answers
73 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 ...