Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

check if string is decimal java

Scanner in = new Scanner(System.in);
		
		String ip1 = in.nextLine();
		
		if( ip1.matches("^d+.d+") ) 
			System.out.println(ip1+"----is a decimal number");
		else
			System.out.println(ip1+"----is a not decimal number");
		
 
PREVIOUS NEXT
Tagged: #check #string #decimal #java
ADD COMMENT
Topic
Name
8+9 =