Java packages | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Java packages

All source files stored in one folder named Runners. A java file storing class InOutFunc there with package Runner; on the top It is compiled. A file with class Runners with import Runner.*; (tried import Runner.InOutFunc;) --- When I try to compile class Runners it doesnt find methods in class InOutFunc despite the fact that either classes are public, methods inside InOutFunc all static, it recognizes import sentence. --- Am I missing something?

20th Apr 2017, 5:43 PM
Alex Snaidars
Alex Snaidars - avatar
2 Answers
+ 10
First question that comes to my mind: Are class names and file names identical?
24th Apr 2017, 9:40 PM
Tashi N
Tashi N - avatar
0
They are. I will upload the copy of files here aa soon as I get to my PC.
25th Apr 2017, 5:56 AM
Alex Snaidars
Alex Snaidars - avatar