Answers for "scanning integer in java"

3

read integer input java

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(br.readLine());
Posted by: Guest on February-20-2020
1

how to scan Integer in Java

import java.util.*;
public class HowToScan {
   public static void main( String args[] ) 
   {
      Scanner S = new Scanner(System.in);
      int a;
      int b;
      int sum;
        a = S.nextInt();
        b = S.nextInt();
        	sum = a + b;
        System.out.println( a + "+" + b  + "=" + sum );
   }
}
Posted by: Guest on March-25-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language