Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.hasan;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String phoneNum = sc.nextLine();
- System.out.println(phoneNum);
- for(int i = 0; i < phoneNum.length(); i++)
- {
- if(i > phoneNum.length()-3)
- {
- System.out.print(phoneNum.charAt(i));
- }else{
- System.out.print("*");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement