How to break out or exit a method in Java??

The keyword break in Java can be used for breaking out of a loop or switch statement. Is there anything which can be...

Which Thread Hold Lock in wait() and notify() multithreading?

I have a confusion in multithreading in below code ... public class ThreadTest implements Runnable { privat...

When to use Hibernate/JPA/Toplink??

Right now I'm making an extremely simple website- about 5 pages. Question is if it's overkill and worth the time to ...

Parse String into Number?

I have a list which will store Number objects. The list will be populated by parsing a list of strings, where each s...

Map values to ArrayList?

I have a Map<Integer, MyClass> and MyClass has 2 fields, Object1 obj and Object2 objj for example. How can I ...

Two dimensional array list?

I've heard of using a two dimensional array like this : String[][] strArr; But is there any way of doing this wit...

how to play video using java??

I want to play a video in media player using java i used JMF to display the video however it gives me an error in on...

Is there a form of “type safe” casting in Java??

Suppose I have two classes deriving from a third abstract class: public abstract class Parent{ public Parent(){...

Sine Wave Sound Generator in Java?

What's the simplest way to generate a sine wave sound at any frequency in Java? A sample size more than 2 bytes woul...

Diffie-Hellman key exchange in Java?

I am working on a personal project in Java which involves sending sensitive data over an insecure channel. I need to...

IMAP client in Java: JavaMail API or Apache Commons Net??

I have to implement an IMAP Client in Java. Which advantages has using the Apache Commons Net library? Does it make...

Is Tomcat middleware??

So I have a client that needs to be running tomcat for various things (Solr and a webservice as well) and after havi...

Declare an array in java without size?

Hello am trying to declare an array in java but i do not want the array to have a specific size because each time th...

java 'jar' is not recognized as an internal or external command?

I'm getting the following error when I try to run the 'jar' command in the command line on windows : 'jar' is not ...