Complete the code to declare a package named 'com.example.app'.
package [1];The correct syntax to declare a package is package com.example.app;. This organizes classes under this package name.
Complete the code to import the class 'MyClass' from package 'com.example.utils'.
import [1].MyClass;
The import statement uses the package name followed by the class name. So import com.example.utils.MyClass; is correct.
Fix the error in the package declaration to follow Java conventions.
package [1];Package names should be all lowercase and use dots to separate parts. So com.example.app is correct.
Fill both blanks to create a package and import statement for 'utils' package.
package [1]; import [2].Helper;
The package declaration and import statement should both refer to the correct package. Here, com.example.utils is used for both.
Fill all three blanks to declare a package, import a class, and create an object of that class.
package [1]; import [2].Service; public class Main { public static void main(String[] args) { [3] obj = new Service(); } }
The package is declared as com.example.app. The import statement imports com.example.service.Service. The object is declared as type Service.
