fork download
  1.  
  2. import java.util.Scanner;
  3. public class Main {
  4. public static void main(String[] args) {
  5.  
  6. // Kullanıcıdan veri alan bir örnek oluşturur
  7. // Kullanıcıdan standart veri alma
  8. Scanner scan = new Scanner(System.in);
  9. System.out.print("Bir sayı girin: ");
  10.  
  11. // nextInt() tam sayı okur
  12. int sayi = scan.nextInt();
  13.  
  14. // println() ekrana yazdırır.
  15. System.out.println("Girilen Sayı: " + sayi);
  16.  
  17. }
  18. }
  19.  
  20.  
Success #stdin #stdout 0.21s 59012KB
stdin
6
stdout
Bir sayı girin: Girilen Sayı: 6