![]() |
[HELP] script java ane error :( gan ane kan nyobak dari tutor nulis ini
Code: package hello; import java.io.*; public class GetInputFromKeyboard { public static void main( String[] args ){ BufferedReader dataIn = new BufferedReader(new InputStreamReader( System.in) ); String name = ""; System.out.print("Please Enter Your Name:"); try{ name = dataIn.readLine(); }catch( IOException e ){ System.out.println("Error!"); } System.out.println("Hello " + name +"!"); } } yg merah tu errornya gan, tp ane gak bisa fix pas di run error gan ni tulisannye Quote: run: java.lang.ExceptionInInitializerError Caused by: java.lang.RuntimeException: Uncompilable source code - class GetInputFromKeyboard is public, should be declared in a file named GetInputFromKeyboard.java at hello.GetInputFromKeyboard.(Main.java:6) Could not find the main class: hello.GetInputFromKeyboard. Program will exit. Exception in thread "main" Java Result: 1 BUILD SUCCESSFUL (total time: 1 second) ane pakek netbeans gan, plis bantu ane ane baru belajar gan, pengen memperdalam tp stuck di masalah ginian bantu ane gan :mewek:: </div> |
All times are GMT +7. The time now is 03:58 PM. |