Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+20 votes

Hey guys,

How do I know if I should use a ava.awt. or java.util. as an import statement?

asked in CSC211_Winter2018 by (1 point)

1 Answer

+8 votes

That depends...

  • Do you want to use the Scanner object in order to read input from the user/keyboard? If so, import java.util.*
  • Do you want to use the Graphics and Color objects in order to create cool pictures? If so, import java.awt.*
answered by (508 points)
...