Printing Integer between Strings in Java

JavaObject Oriented ProgrammingProgramming

Following is the Java program to print integer between Strings −

Example

 Live Demo

public class Demo{
   public static void main(String[] args){
      System.out.println("The equals symbol is present between two integer values ");
      System.out.println(45+5 + "=" +(56+11));
      System.out.println(45+5 + " equals symbol " +(56+11));
   }
}

Output

The equals symbol is present between two integer values
50=67
50 equals symbol 67

A class named Demo contains the main function that prints integer values between two strings.

raja
Published on 04-Jul-2020 10:48:59
Advertisements