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
Linuxmania Linuxmania is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 392
Rep Power: 15
Linuxmania mempunyai hidup yang Normal
Default [ask] nubi mau tanya java ni gan...

ane mau baut input dengan hasil



"hallo " + name1 + " dan " +name2



ini coding yang ane buat....


Quote:





import java.io.*;





public class InputBuffer

{

public static void main (String[] args)

{

BufferedReader asd = new BufferedReader(new InputStreamReader (System.in));

String name1 = "" ;

System.out.print ("masukan nama1:");

BufferedReader asdf = new BufferedReader(new InputStreamReader (System.in));

String name2 = "" ;

System.out.print ("masukan nama2:");









try

{

name1 = asd.readLine();

name2 = asdf.readLine();

}

catch(IOException e)

{



System.out.println ("error");

}



System.out.println ("hallo " + name1 + " dan " +name2);





}








tapi koq name2nya ga keluar ya gan....

masi belajar ane gan....

mohon pencerahannya.....

</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


Terkait
Thread Thread Starter Forum Replies Last Post
Nubi numpang tanya Gorillaks Mobil 0 20th October 2012 04:53 PM
[ask] nubi numpang tanya nih gan ?? bostempe Lounge 0 27th May 2012 06:04 PM
[ASK] Ane Nubi Ndan,,Mau Tanya + Saran :D rekiya Kritik, Saran dan Pertanyaan 13 25th May 2011 01:09 AM

 


All times are GMT +7. The time now is 01:59 AM.