Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

has 8 digit in number

public bool hasEight(int number)
{
      while(number > 0)
      {
        // we can check any num instead of 8
          if(number % 10 == 8){
              return true;
          }
          number=number/10;
      }
      return false; 
}
Comment

PREVIOUS NEXT
Code Example
Java :: how to copy a linked list to another in java 
Java :: bigint is built in object 
Java :: hello world in bukkit 
Java :: how to print message to console java 
Java :: how to do two constructors with super 
Java :: last block incomplete in decryption 
Java :: sha 1 key throguh java is not working 
Java :: return vs break 
Java :: android prevent screen from turning off programmatically 
Java :: java find nth largest element using priority queue heap 
Java :: https://www.baeldung.com/java-stream-findfirst-vs-findany 
Java :: java file reader construct input 
Java :: java resultset.absolute 
Java :: how to stop spring boot application 
Java :: jakarta allow cross origins 
Java :: how to get the length of a jagged array java 
Java :: initialize set of strings java 
Java :: exception(string message throwable cause) 
Java :: interfaces in java 
Java :: adding matrix 
Java :: java singleton with synchronized double check 
Java :: UserRedirectRequiredException: A redirect is required to get the users approval spring boot 5 security 
Java :: converting amount into millions nad billions Java 
Java :: GLG203 
Java :: using handler runnable for refresh android 
Java :: longadder 
Java :: txt not chnage on fragment 
Java :: least count of words required to construct a target string 
Java :: Custom Layout to listview 
Java :: how to find last digit in number by regex in java 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =