Computer Science, asked by pirates817, 6 months ago

Take A Number Input Print True If It 3 Digit Number Otherwise Print False

Please do this java program correctly really very important ​

Answers

Answered by udayagrawal49
0

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 try {

  System.out.println("Enter a number");

  Scanner scan = new Scanner(System.in);

  int a = scan.next().length();

  scan.close();

  if (a == 3) {

      System.out.println("True");

  }

  else {

      System.out.println("False");

  }

 }

 catch (Exception e) {

  System.out.println("Some error occured");

 }

}

}

Please mark it as Brainliest.

Similar questions