Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

phone number format java

long phoneNum = 123456789L;
    System.out.println(String.valueOf(phoneNum).replaceFirst("(d{3})(d{3})(d+)", "($1)-$2-$3"));
Comment

PREVIOUS NEXT
Code Example
Java :: how to add textview to listview in android 
Java :: what is whitespace in java 
Java :: Java print() and println() 
Java :: reverse java 
Java :: java math ceil 
Java :: java node class 
Java :: java string character at index 
Java :: java input - how to read a string 
Java :: list java 
Java :: concurrenthashmap in java 
Java :: java generics type 
Java :: sort 2d array based on one column java 
Java :: array find max in java 
Java :: arraylist 
Java :: program to check if the given date is in in the format dd/mm/yyyy java 
Java :: write message in file java 
Java :: how to draw a triangle in java 
Java :: java home 
Java :: java run jar with args 
Java :: java check if string ends with 
Java :: java.lang.IllegalStateException: Could not obtain identifier 
Java :: add java 8 support to pom 
Java :: run webgoat using docker 
Java :: What is the function of an IntentFilter? 
Java :: spring yml property boolean 
Java :: video compression with java 
Java :: display two dimensional array java 
Java :: Iterating Through the Java Map 
Java :: Unexpected end of file in android studio activity main.xml 
Java :: maximum number from random number in java 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =