intellij idea - Hello World throwing error in Java -


from understand, intellij trying run program test file created first. how can fix this?

i'm trying run simple piece of code feel java. i'm not sure error means

> exception in thread "main" java.lang.classnotfoundexception: test     @ > java.net.urlclassloader.findclass(urlclassloader.java:381)    @ > java.lang.classloader.loadclass(classloader.java:424)     @ > sun.misc.launcher$appclassloader.loadclass(launcher.java:331)     @ > java.lang.classloader.loadclass(classloader.java:357)     @ > java.lang.class.forname0(native method)   @ > java.lang.class.forname(class.java:264)   @ > com.intellij.rt.execution.application.appmain.main(appmain.java:122) 

this code

public class age {     public static void main(string[] args){         system.out.println("hey hey");     } } 

right click , run age.main(). use this screenshot building , running java application

enter image description here

also please note:

the public class name should name of source file should appended .java @ end. example : class name . public class employee{} source file should employee.java.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -