Computer Science, asked by sanchana33, 9 months ago

please write the program of this using scanner in java.​

Attachments:

Answers

Answered by AkshatSir
2

Answer:

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 purveshKolhe
2

Answer:

If you want scanner, you first need to import it:

import java.util.Scanner;

Scanner as = new Scanner(System.in);

int x = as.nextInt;

Similar questions