SHARE
TWEET

welp, idk if it'll work though

a guest Jun 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Main{
  4.   public static void main(String [] args){
  5.  
  6.     Scanner input = new Scanner(System.in);
  7.     boolean flag=true;
  8.     do{
  9.          
  10.           System.out.println("Apakah Nama Anda?");
  11.           String Nama;
  12.           Nama = input.nextLine();
  13.           System.out.println("Hi, " + Nama);
  14.          
  15.     System.out.println();
  16.     System.out.println("-----------------------------");
  17.     System.out.println("Taip ya Untuk Meneruskan dan Tidak Untuk Berhenti");
  18.     if(scanner.next().equals("ya")){
  19.       flag = true;
  20.     }else{
  21.       flag = false;
  22.     }
  23.    }while(flag);
  24.   }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top