Call method from different class in a different package (beginner)
Hello, i have the following Problem:
I have a class
Histogramm.java
inside a package Basis
And my Main.java
inside the package Main
Histogramm.java
has a function i want to call from Main.java
in my Main.java
file i have a a Matrix that i want to pass to the gibHistogrammDaten(Mat bildMatrix)
method.
I've been trying to call that method for a couple hours now.
I tried setting the method to static public static int[] gibHistogrammDaten(Mat bildMatrix)
which didn't work.
I also tried creating an object of Histogramm lel = new Histogramm();
to go the route of int[] histogramm = lel.gibHistogrammDaten(hilfeOne);
but that didn't work either.
Next try was
which just tells me "The method gibHistogrammDaten(Mat)
is undefined for the type Aufgaben02"
Pretty much every answer i've found on google didn't work.2 Replies
⌛
This post has been reserved for your question.
Hey @Wannabree! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Post Closed
This post has been closed by <@237269674654433282>.