Which package is imported by default in java?

Hint:

Some of the classes you can use without an import include String and System. What package are they in?

Well,java.lang package is imported by default even without a package declaration.

"even without a package declaration", I assume you meant "even without an import statement" there?

and I'd change that into "without an explicit import statement" to be fully correct.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.