JAVA - SCANNER INPUT


SUBMITTED BY: Guest

DATE: March 19, 2014, 9:05 a.m.

FORMAT: Text only

SIZE: 372 Bytes

HITS: 767

  1. import java.util.Scanner;
  2. public class BacaTerminal {
  3. /**
  4. * ganti nama class dengan class yang baru dibuat
  5. * @author Adi Jvlian
  6. */
  7. public static void main(String[] arg) {
  8. Scanner sc = new Scanner(System.in);
  9. System.out.println("Nama Anda ? ");
  10. String nama = sc.next();
  11. System.out.println("Apa kabar "+nama+" ?");
  12. }
  13. }

comments powered by Disqus