java - How to throw RuntimeException ("cannot find symbol") -


I am trying to throw an exception in my code like this:

  RuntimeException Throw (msg);  

But when I create a netban I get this error:

  c: \ .... java: 50: not symbol symbol Can get: method runtime exception (Java.lang.String) location: class ... runtime exception (msg) throw; 1 error  

Do I need to import something? Do I have this misspelled? I'm sure I should dumb something: - (

New runtime expiry (msg) )

You need to have the new in it. This is making an example and throwing it, not calling a method.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -