Advertisement
JeffGrigg

Mobile

Dec 14th, 2018
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.40 KB | None | 0 0
  1. public class Mobile {
  2.     public static void main(String[] args) {
  3.         final String mobnum = "9071744430";
  4.         final char[] ds = mobnum.toCharArray();
  5.         System.out.println(ds);
  6.  
  7.         String res = "";
  8.         for (char i : ds) {
  9.             if (i == '0' || i == '1') {
  10.             } else {
  11.                 res += i;
  12.             }
  13.         }
  14.         System.out.println(res);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement