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
PHPmaster PHPmaster is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 332
Rep Power: 14
PHPmaster mempunyai hidup yang Normal
Default [help]nubi tny ttg JAWA

assallamu'alaikum wr.wb

malem sepuh2 kaskus, ane newbie dimari (termasuk nubi jg di programming) klo salah taruh trit mohon maaf.



mo tny knp yah koq program dasar yg ane buat ga keluar box argument. Padahal di contohnya keluar box arguments. Memang sih buku yg ane pelajarin lawas bgt (keluaran thn.2003).



spec ane:

- IDE Gerhana (europe edition ver-3.3.2)

- JDK 1.6, JRE 1.6



programnya udh ane coba kotak-katik tetep aj error gini:


Code:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at promptNamaARGS.main(promptNamaARGS.java:4)

anehnya di tab problems itu gak ada error, tp di tab console errornya.



inti programnya membuat box argument yg cm keluar 1x trus diisi 2 bilangan yg dipisahkan spasi


Spoiler for sample:

















PHP Code:




class declareVariable {

public static
void main(String[] args) {

int angka_1 = Integer.parseInt(args[0]);

int angka_2 = Integer.parseInt(args[1]);

int angka_3 = angka_1 + angka_2;



System.out.println("angka_1 = "+angka_1);

System.out.println("angka_2 = "+angka_2);

System.out.println("angka_3 = "+angka_3);

}



}







kenapa yax kira2?? bingung. MOhon dibantu master2

</div>

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 10:34 AM.


no new posts