Recent questions tagged java

Ask a Question
0 votes
0 answers 17 views

What is the best way to convert a String in the format 'January 2, 2010' to a Date in Java? ... = date.getTime(); to convert the date into time....

–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.)...

+1 vote
1 answer 23 views

I got a AsyncTask that is supposed to check the network access to a host name. But the ... splash); return; } main.continueAfterHostCheck(); } }...

+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?...

+2 votes
0 answers 9 views

I am trying to write a simple application that gets updated. For this I need a simple function that ... how to download the file in the first place....

+2 votes
0 answers 13 views

(Disclaimer: There are a ton of questions which arise from people asking about data being null/incorrect when ... ...but it is still null here. Etc....

0 votes
0 answers 5 views

A ... ...

0 votes
0 answers 13 views
+1 vote
0 answers 12 views

In Java, arrays don't override toString(), so if you try to print one directly, you get the ... doing that? Here are some example inputs and outputs:...

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 15 views

I always thought Java uses pass-by-reference. However, I've seen a blog post that claims ... distinction they're making. What is the explanation?...

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?...

To see more, click for the full list of questions or popular tags.
...