O.O
O.O

Reputation: 11287

What is the correct syntax for using "import"?

According to this I should be able to have multiple import statements like this:

import class1, class2, class3, class4

Class MyApp.MyClass {}

The code compiles with one import, but as soon as I place more than one the code fails to compile.

What is the correct syntax?

Upvotes: 1

Views: 101

Answers (2)

DAiMor
DAiMor

Reputation: 3205

documentation
more than one package, you need to take in brackets

Upvotes: -1

psr
psr

Reputation: 2900

I can't find it in the documentation, but

import (class1, class2, class3, class4)

Class MyApp.MyClass {}

seems to work.

Upvotes: 1

Related Questions