Suppose I am in a folder that has a subfolder called widgets

Suppose I am in a folder that has a subfolder called widgets that contains several .class files. Write the command-line instruction that will create a jar file called widgets.jar that contains the .class files in the widgets subfolder.

Suppose I have a class called Snuffleupagus that is contained in a package called sesame.street. Suppose I want to use that class in a new source file that I’m using. Write the line I would have to include in that new source file in order to be able to use the Snuffleupagus class.

Solution

import sesame.street.Snuffleupagus;

You have to add this line in another package currently using

import package_name.class_name;

You have to give package name and then class name don\'t forgot to put period in between package name and class name

Suppose I am in a folder that has a subfolder called widgets that contains several .class files. Write the command-line instruction that will create a jar file

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site