How to delete stuff printed to console by System.out.println()??

In a Java application I'm using some calls to System.out.println(). Now I want to find a way to programmatically del...

2D array Null Pointer Exception error?

public class DoubleMatrix { private double[][] doubMatrix; public DoubleMatrix(int row, int col) { ...

Casting Object to Object[][]?

I need to cast an object into a multidimensional array but can't figure out how to do it. The object might contain a...

How to call a function when I click on a jPanel (Java)??

I'm working with Netbeans IDE in Java. I've a form with one JPanel. Each JPanel has a gridLayout 3x3 and in each pl...

Java calling variable in another method?

I'm new to Java programming, I just have a easy question but I can't do it because I didnt know how to write it on J...

How do I check whether input string contains any spaces??

I have a input dialog that asks for XML element name, and I want to check it to see if it has any spaces. can I do ...

Remove last element from HashMap?

I am trying to remove last element from Map<String, List<String>> map = new HashMap<String, List&lt...

No output when I run this code?

This bit of code I'm doing was for practice with "While loops". When I run this code to count the amount of digits i...

Get the filePath from Filename using Java?

Is there a easy way to get the filePath provided I know the Filename? ...

how to use StringTokenizer in java for next line??

Let's say I have a continuous String name as temp. The string is divided by new lines, How can I use StringTokenizer...

How to iterate over a 2D array with a single loop??

how can we navigate through the two dimensional array without using nested loops.i.e by using only one loop. Strin...