Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to declare a package named 'com.example.app'.
Java
package [1];🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
2fill in blank
mediumComplete the code to import the class 'MyClass' from package 'com.example.utils'.
Java
import [1].MyClass;
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
3fill in blank
hardFix the error in the package declaration to follow Java conventions.
Java
package [1];🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
4fill in blank
hardFill both blanks to create a package and import statement for 'utils' package.
Java
package [1]; import [2].Helper;
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
5fill in blank
hardFill all three blanks to declare a package, import a class, and create an object of that class.
Java
package [1]; import [2].Service; public class Main { public static void main(String[] args) { [3] obj = new Service(); } }
🎯 Drag options to blanks, or click blank then click option
Attempts:
3 left
