Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

compare string length of two strings

// Java program to demonstrate working
// of java.lang.Integer.compare() method
import java.lang.Integer;
  
class Gfg {
    // driver code
    public static void main(String args[])
    {
        int a = 10;
        int b = 20;
  
        // as 10 less than 20, Output will be a value less than zero
        System.out.println(Integer.compare(a, b));
  
        int x = 30;
        int y = 30;
  
        // as 30 equals 30, Output will be zero
        System.out.println(Integer.compare(x, y));
  
        int w = 15;
        int z = 8;
  
        // as 15 is greater than 8, Output will be a value greater than zero
        System.out.println(Integer.compare(w, z));
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: java destroy object 
Java :: stop countdown timer when exiting an activity 
Java :: how to get the url after loading page in webview in andorid 
Java :: online currency rate api 
Java :: minecraft block java 
Java :: enhanced 4 loop 
Java :: SpringBootStarter maven dependency 
Java :: java list sort comparator date descending lambda 
Java :: produces 
Java :: java 8 list of objects get only first occurance 
Java :: How to code the Fibonacci Sequence using simple iterative loops in java 
Java :: class java 
Java :: Lists - removing with iterator 
Java :: paysimple 
Java :: java unused import statement 
Java :: getcokor from drawable in java android studio 
Java :: setBackgrounfTint color to relative layout from java file 
Java :: pgzint install windows 10 
Java :: null pointer exception during registering user to the firebase 
Java :: synchronized method in java 
Java :: android studio null 
Java :: springBoot Disable a Specific Auto-Configuration 
Java :: increasing the element without any replacement in java program 
Java :: chemistry formula on android 
Java :: struct in java 
Java :: com.google.firebase.database.DatabaseException: Serializing Arrays is not supported, please use Lists instead 
Java :: java format zero padded binary 
Java :: how to create a 2d arraylist java 
Java :: java arrays method 
Java :: what is operator overloading in java 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =