×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Kirill Leventcov
Added: Oct 26, 2021 6:14 PM
Views: 2193
Tags: boolean
  1. import java.util.Scanner;
  2.  
  3. public class program {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         System.out.println("Write a boolean ");
  7.         boolean value = Boolean.valueOf(scanner.nextLine());
  8.         System.out.println("You wrote " + value);
  9.     }
  10. }