Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package com.hasan;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7. public static void main(String[] args) {
  8. Scanner sc = new Scanner(System.in);
  9. String phoneNum = sc.nextLine();
  10. System.out.println(phoneNum);
  11. for(int i = 0; i < phoneNum.length(); i++)
  12. {
  13. if(i > phoneNum.length()-3)
  14. {
  15. System.out.print(phoneNum.charAt(i));
  16. }else{
  17. System.out.print("*");
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement