Java main() and Scanner

Java main() and Scanner

Professional Development

10 Qs

quiz-placeholder

Similar activities

quizz-software

quizz-software

Professional Development

13 Qs

JAVA QUIZ

JAVA QUIZ

Professional Development

11 Qs

Quiz Java cz1

Quiz Java cz1

Professional Development

11 Qs

Java SE: Programming I

Java SE: Programming I

Professional Development

10 Qs

DOT NET-SET1

DOT NET-SET1

Professional Development

15 Qs

Examen sorpresa tema 2 1º Programación

Examen sorpresa tema 2 1º Programación

Professional Development

10 Qs

Quiz Java héritage

Quiz Java héritage

Professional Development

10 Qs

java 3

java 3

Professional Development

9 Qs

Java main() and Scanner

Java main() and Scanner

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Claudiu Haidu

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the entry point for a Java program?

main()

start()

init()

run()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which modifier is used with the main method in Java?

public

private

static

final

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is the main method declared in Java?

void main(String[] args)

static void main()

public static int main(String[] args)

public static void main(String[] args)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which class is used to take input from the user in Java?

InputReader

BufferedReader

Scanner

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which package is Scanner class located in Java?

java.util

java.lang

java.text

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a Scanner object to take input from the user in Java?

Scanner scanner = new Scanner();

Scanner scanner = new Scanner(System.in);

Scanner scanner = Scanner(System.in);

Scanner scanner = new SystemScanner();

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method do you use to read a string input from the user using Scanner?

nextLine()

readLine()

readString()

inputString()

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?