Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Okay, basically I would like to write a class file in Java with a bunch of funct

ID: 3627200 • Letter: O

Question

Okay, basically I would like to write a class file in Java with a bunch of functions that I would like to use elsewhere in my project(Using the Netbeans IDE). I have already accomplished this but I have to call the Class name in order to access my functions. For instance:
int prod = Toolkit.Calculate(x, y);
(Not a real function of mine)

Instead of that I would like to somehow import my class and just simply do:
import Toolkit.*;

int prod = Calculate(x, y);

Not working out so well and I don't know whether or not this is inefficient.

Explanation / Answer

define that class as

package Toolkit;

and moreover that function should be public and should be accessible.

now import package and try. it will work.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote