Multiple choice technology programming languages

What is the advantage of using import statements?

  1. To avoid having to declare variables.

  2. To refer to a class without using prefixes.

  3. To avoid calling methods.

  4. To import the images you want to use.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Java import statements allow you to reference classes by their simple names instead of fully-qualified names. They don't affect variable declaration (A), method calling (C), or handle images (D). Imports are purely a compile-time naming convenience.