Computer Science, asked by singhkushwahaayush0, 19 days ago

write the syntax of Import scanner class
in computer​

Answers

Answered by lBrainlyBrokenl
1
  • import java.util.*;
  • public class ScannerClassExample2 {
  • public static void main(String args[]){
  • String str = "Hello/This is JavaTpoint/My name is Abhishek.";
  • //Create scanner with the specified String Object.
  • Scanner scanner = new Scanner(str);
  • System.out.println("Boolean Result: "+scanner.hasNextBoolean());
Answered by hjeet176kaur
3

Answer:

Example 3

import java.util.*;

public class ScannerClassExample2 {

public static void main(String args[]){

String str = "Hello/This is JavaTpoint/My name is Abhishek.";

//Create scanner with the specified String Object.

Scanner scanner = new Scanner(str);

System.out.println("Boolean Result: "+scanner.hasNextBoolean());

Explanation:

thank you

Similar questions