I want to split the string "004-034556" into two strings by the delimiter "-": part1 = ... to check if the string has '-' in it....
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.)...
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....
In Java, are there clear rules on when to use each of access modifiers, namely the ... making class and interface and dealing with inheritance?...
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?...
I want to add JTable into JPanel whose layout is null. JPanel contains other components. I have to add JTable at proper position....
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?...
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?...
What does ArrayIndexOutOfBoundsException mean and how do I get rid of it? Here is a code sample that triggers the exception:...
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:...
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?...
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What ... from causing the program to terminate prematurely?...
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....
2.6k questions
24 answers
34 comments
16.4k users