Question: Sometimes when you are debugging, you have unreachable code fragment. Is there anyway to suppress the warning?

Answer: 
Java has (primitive) support for debugging like this in that simple `if` on boolean constants will not generate such warnings (and, indeed when the evaluation is false the compiler will remove the entire conditioned block). So you can do:

```
if(false) {
    // code you don't want to run
    }

```

Likewise, if you are temporarily inserting an early termination for debugging, you might do it like so:

```
if(true) { return blah; }

```

or 

```
if(true) { throw new RuntimeException("Blow Up!"); }

```

And note that the Java specification explicitly declares that constantly false conditional blocks are removed at compile time, and IIRC, constantly true ones have the condition removed. This includes such as:

```
public class Debug
{
static public final boolean ON=false;
}

...

if(Debug.ON) {
    ...
    }

```
As [Cletus tells us](https://stackoverflow.com/questions/1205995/what-is-the-list-of-valid-suppresswarnings-warning-names-in-java/1206001#1206001),

> 
> It depends on your IDE or compiler.
> 
> 
> 

That said, at least for Eclipse, there is not a way to do this. With my Eclipse configuration, unreachable code causes a compile-time error, not just a warning. Also note this is different from "dead code," e.g.

```
if (false)
{
    // dead code here
}

```

for which Eclipse (by default) emits a warning, not an error.