Recent questions and answers in Java

Ask a Question
–1 vote
0 answers 20 views

I want to split the string "004-034556" into two strings by the delimiter "-": part1 = ... to check if the string has '-' in it....

+1 vote
0 answers 31 views

Here is a piece of C++ code that shows some very peculiar behavior. For some reason, sorting ... we needed to calculate this for an unknown array.)...

+4 votes
0 answers 21 views

Due to the implementation of Java generics, you can't have code like this: public class GenSet<E> { ... But I really don't get what's going on....

+2 votes
0 answers 16 views

In Java, are there clear rules on when to use each of access modifiers, namely the ... making class and interface and dealing with inheritance?...

0 votes
0 answers 14 views

I'm new to Java EE and I know that something like the following three lines <%= x+1 ... JSP 2 lines, and what is this technique called?...

0 votes
0 answers 15 views

I want to add JTable into JPanel whose layout is null. JPanel contains other components. I have to add JTable at proper position....

–1 vote
0 answers 11 views

How do you write (and run) a correct micro-benchmark in Java? I'm looking for some ... benchmark measure time/iteration or iterations/time, and why?...

0 votes
0 answers 13 views

What are raw types in Java, and why do I often hear that they shouldn't be used in new code? What ... we can't use raw types, and how is it better?...

0 votes
0 answers 12 views

What does ArrayIndexOutOfBoundsException mean and how do I get rid of it? Here is a code sample that triggers the exception:...

+1 vote
0 answers 17 views

I am using the Scanner methods nextInt() and nextLine() for reading input. It looks like this: ... is executed, so that my output looks like this:...

0 votes
0 answers 25 views

I've been using the == operator in my program to compare all my strings so far. However, I ran ... and should it not be used? What's the difference?...

+1 vote
0 answers 8 views

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What ... from causing the program to terminate prematurely?...

0 votes
0 answers 8 views

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried ... server, running MySQL 5, PHP, 5 and Apache 2....

Help get things started by asking a question.
...