Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
SinggahDapur SinggahDapur is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 348
Rep Power: 14
SinggahDapur mempunyai hidup yang Normal
Default [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 :



Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 07:21 AM.


no new posts