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.

learn more… | top users | synonyms

-2
votes
0answers
21 views

Can Camel be used for building up html pages? [on hold]

Is it possible and furthermore should it be done? If I have 10 web services that all generate different parts of a web page. For example header, footer and body elements. Should I use Camel or some ...
-4
votes
1answer
59 views

Learning Java. Planning to create my first java project. I have an idea for a logfile error aggregator (details inside), but how do I start? [on hold]

I'm thinking of coding a 'Logfile Error Aggregator'. I'm not sure if it's anything useful or not, but it's something (possibly) practical: Assume there is a folder full of log files. Each file ...
1
vote
4answers
150 views

Java exception handling design

I am trying to design a simple exception handling strategy for web services middleware using some ideas from here: http://northconcepts.com/blog/2013/01/18/6-tips-to-improve-your-exception-handling/. ...
2
votes
2answers
123 views

Passing by value multiple times vs. Creating a public class variable

Suppose I have a series of methods across different classes that all use the same five core variables defined in my main method. I could chain these five variables as method arguments from one method ...
0
votes
3answers
172 views

I want to understand clearly why can't we instantiate an object of an abstract class [duplicate]

Can I get a clear explanation why why can't we instantiate an object of an abstract class. I know abstract is not real. But I want to know more why can't we instantiate an object of an abstract class. ...
0
votes
0answers
58 views

What is the best way to implement a workaround for Log4J's DailyRollingFileAppender issue on Windows?

I understand that there is an open bug with Log4J 1.2.x because (apparently) the java.io.File.renameTo() function fails due to a OS lock on the log file, which causes the file not to be renamed. I ...
-1
votes
0answers
38 views

SCJP like book for C++ [on hold]

I read SCJP study guide two years ago and it helped me become a better Java programmer. I would like to use the same success recipe, so I'm asking : Do you know any C++ book that is structured like ...
2
votes
0answers
76 views

Batching immutable object changes?

With immutable models, what would be the best way to batch several changes? For example, lets have a Book that is immutable. I need to change both title and year. I could change one by one, but that ...
-2
votes
0answers
21 views

Not getting value in second cycle of when returning to form 1 from form 4 in java project [on hold]

I am working on a java project, where i had created 4 jsp forms. On first form i had a select box. I select a value from option. Then I go to form 2,3 and 4,here the selected value is disabled. From ...
-2
votes
0answers
12 views

How to activate Code completion for Javafx CSS Tags? [on hold]

I deactivated the Code suggestions and completion for Javafx specific CSS Tags like - fx-background-color accidentally in intellij idea. Anybody knows how to activate it again? Thanks
-1
votes
0answers
34 views

Making hard to hack java standalone apps [duplicate]

I created an app in java, but this app (packed as .jar) will be distributed to people, and I want to charge for usage of this app. I chose java as I'm unfamiliar with C++, to make a source code ...
1
vote
0answers
80 views

Streamlining a method to run faster [migrated]

Update: I did some guesswork tweaking and let the heap reach a maximum of ~450 Megabytes (was originally using invokeAll). The program just finished in 6.3 minutes. I've been advised to use ctrl + ...
-4
votes
0answers
39 views

Best Java Books To Buy? [on hold]

I'm a beginner at programming and I'm currently using the book Heads First Java but I like to use 2-3 books when learning something new like this to make sure I cover everything and I have $60 US ...
-4
votes
0answers
34 views

not found symbol error for InitialContext in “final Context context =new InitialContext(jndiProperties)” [on hold]

In Netbeans, when I am writing this particular code final Context context =new InitialContext(jndiProperties), then IntialContext showing error symbol not found. Here is Complete code: package ...
0
votes
3answers
188 views

Java 1.7 library with a Java 1.5 program - what are the options

I have a class library which is compiled with JDK 1.7 It uses several 1.7 features and classes and would be very difficult to get it recompiled in JDK 1.5. This needs to integrate with an old legacy ...
-5
votes
1answer
89 views

Help Understanding This? [on hold]

I'm using the book Heads First Java and I just don't understand it at some parts and the book doesn't explain it well enough. Could someone please tell me what each line does? public class whileloop ...
-1
votes
0answers
49 views

How to start learning Java the right way? [on hold]

I'm new in the world of programming! I don't know if my goal will be to develop windows programs, mobile apps, or web applications. I have heard that Java is a good language to tart learning coding ...
1
vote
0answers
54 views

how to prevent mouse grab while debugging 3D application on a java IDE? [migrated]

Most 3D applications grab the mouse. This means the OS cursor is hidden and only the 3D application cursor is shown (and only within the application). In case it is a game, the cursor is completely ...
0
votes
0answers
4 views

working with the command prompt in Java [migrated]

I've been learning java on my own and I've come to a point where I need to pass arguments from the command prompt. I had previously been using Netbeans, which has become a bit of a crutch, but I want ...
-2
votes
0answers
31 views

Learning Java and then Android [closed]

I'm a newbie in the world of programming. I've done the book C for Dummies by Dan Gookin before, and now I'm learning Java from the Official Oracle Java website. I am thinking of doing application ...
-1
votes
0answers
78 views

How to properly close a Scanner class inside a method? [migrated]

I have this code that calls to a method in order to check if a number is a certain length, and if not, a new number should be reintroduced by the user. Problem here is, I can't find the proper way ...
-5
votes
0answers
22 views

Where Do I Start? [Java] [closed]

I'm looking into making a Parcel Tracker for android for personal use and maybe distribute it later on once it works properly. Where would I start? I'm very new to programming, I know some basics of ...
-1
votes
0answers
34 views

Is this way to implement ECIES cipher's correct? [migrated]

I downloaded source code of cryptosms from http://cryptosms.org/download.html and implemented ECIES cipher in my work for Java mobile. I doubt validity of this step (full code of my method is below): ...
-4
votes
0answers
44 views

which is the equivalent code in c# of this maked with java and bouncycastle? [closed]

Hello i can't convert this code written in java and with bouncycastle to c# . Why bouncycastle library for c# doesnt has the Cipher class? In detail i want use the Ecies cryptography like in this ...
3
votes
1answer
58 views

Skeletal/Abstract class just to store shared state?

Given an interface for the Strategy pattern like so: public interface Strategy { public Output execute(Input input); public Output getLastExecutionOutput(); } if I want to store the last ...
-4
votes
0answers
31 views

How to pause a for loop and allow the user to enter something into the text field before it continues [closed]

I this code which the user is expected to enter this sentence, "samad is going to school" but one word at a time and press enter. it works for the first round of the loop, but the loop does not allow ...
1
vote
1answer
92 views

Is there a quicker method for returning a sublist after a certain index of a list in Java?

I'm working on a program in which I will need to frequently truncate the beginning of a list, by just a few indices. (Sometimes, only one.) Then, the new list must be passed on to another method, ...
-4
votes
0answers
35 views

How to get requestet domain? [closed]

I am trying to make a selector based on the domain. I want to host a lot of servers behind one public ip. I created a java program that forwards everything to the server or vice versa something back ...
-5
votes
1answer
91 views

What is the purpose of Deprecation? [closed]

Is it just giving different names to previously named method? Does it change with the language you use? Is it essential? I have noticed different APIs having deprecated methods, which actually seem ...
0
votes
0answers
25 views

Status updates design review [migrated]

I need help identifying any significant design issues with some code I have generated to track status updates. I have a big task A which contains multiple small tasks and each of these small tasks ...
0
votes
0answers
45 views

Passing values from custom columns

This question is a bit subjective so the intention is to get some feedback on a problem I'm experiencing and ways around it. The kind of answer I'm expecting will answer the question "what are good ...
1
vote
0answers
50 views

How to pass control between sub-controller to parent controller in Java MVC Design Pattern?

I'm pretty new in Java, but I've done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the ...
0
votes
1answer
103 views

How do different technologies connect to form a web stack? [closed]

I am a little confused, is it possible to implement a front end using common languages like html, css and javascript and then do server side processing using a language of your choice, say python or ...
5
votes
2answers
274 views

Why can't I understand Java? [closed]

I'm a 9th grader and I joined my school's robotics team in order to learn how to code Java and enter the programming team. However, I am so confused! Even after the first lesson, I had no idea what ...
-5
votes
1answer
48 views

How best to design a SQL Parser in java, any prevailing design pattern comes to mind? [closed]

What software pattern is most useful for building a SQL Parser? I would like some ideas on how to even get started on something like this.
-2
votes
0answers
53 views

Selling the idea of using Python vs Java for offline batch jobs [duplicate]

I need to make a case to my team why we should expand our technology spectrum onto Python. We currently use Java with JBoss and JSF/PrimeFaces for our mission critical, user-interactive web ...
-3
votes
0answers
40 views

How can i delete 1st newline form any text file by using Regex code or using java? [closed]

[Probelem] I need a java source code which could delete or remove first 1 single newline form text file or Need a RegEX code notepad++ for remove or delete 1 single newline. I'm having a serious ...
3
votes
1answer
98 views

Should a class explicitly implement interface if its superclass also implements it?

Given an interface interface I { one(); two(); } An abstract base class partially implementing I abstract class A { @Override void one() { //something } } And lastly ...
-1
votes
0answers
8 views

H ow to take more than two words from a textField at different times [migrated]

I have this code which I one textField and want a user to be able to type through the words in a sentence, like a typing test pressing enter after each word entered. The first word the user typed ...
0
votes
4answers
536 views

Why 'List<E>' is an 'interface' but not 'abstract class'?

While defining the hierarchy, one can think to embed the abstract method(behaviour) in abstract class only because the derive concrete class posses that as core behaviour with it's specific ...
-2
votes
0answers
28 views

Automating internet processes [closed]

I am trying to automate some internet process but I am little bit confused about where to start and what king of progrmaming language I need for this situation. I know how to use VBA but I am not an ...
-3
votes
0answers
109 views

Is 16 an Appropriate Age to Start Learning Software Development, Even If It Interferes With School? [closed]

I am currently 17 and am self-taught in various programming/scripting languages. These include, Java, JavaScript, HTML, CSS, and basic Lua. I learned my first programming language at 16, that being ...
-5
votes
0answers
16 views

Reopen request - Will java be relevant in 5 years? [migrated]

I don't have enough rep to post in meta. I'd like to know if this (4 year old) thread could be reopened. Will Java still be relevant in 5 years? Java is taught in the intro to Computer science ...
0
votes
0answers
39 views

Is this interpretation correct on usage of interface? [migrated]

We have numerous threads talking about the usage of interface vis-a-vis abstract class Taking reference of an answer, given by Prasun looks complete answer to me. Do you think this is complete ...
1
vote
2answers
289 views

Programming against interfaces in Java

Supposing I have an interface Foo and a given implementation FooImpl. public class FooImpl implements Foo If I want to define a new operation on this class that depends on the particular ...
-4
votes
0answers
20 views

How to have a command line print out a text document in java [migrated]

I'm currently coding a choose your own andventure and in java and need to have the console print out a number of text documents. Currently I have File myFile1 = new File ...
0
votes
1answer
164 views

Is factory pattern a right pattern for the situation described here?

Is factory pattern a right pattern when we want to consolidate the related objects? Problem - In the Set-top box, I have a user-io, basically the interface to control the settop box - The user-io can ...
0
votes
5answers
186 views

Race conditions in JVM languages versus C/C++

I was thinking about thread synchronization issues in compiled languages like C++, versus synchronization issues in languages like Java. I'm wondering how a JVM language like Java doesn't (at least ...
0
votes
0answers
17 views

Java two for outer for loops with two inner for loops that add to a string and the first one doesn't do anything [migrated]

public static void diamondOfAsterisks(int numOfRows){ String diamondStr=""; for (int row = 1; row == (numOfRows/2+1); row++){ for (int space = numOfRows; space < row; space--){ ...
7
votes
5answers
706 views

Coding style issue: Should we have functions which take a parameter, modify it, and then RETURN that parameter?

I'm having a bit of a debate with my friend over whether these two practices are merely two sides of the same coin, or whether one is genuinely better. We have a function which takes a parameter, ...