Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+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 (8 points)

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 (186 points)