Why its give me error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why its give me error

https://sololearn.com/compiler-playground/cFe2cznLSfMO/?ref=app https://sololearn.com/compiler-playground/cZvWelQGDr16/?ref=app Result 👇 ~ $ ls Apktool-termux Ops.class Ops.java storage sum.java ~ $ pwd /data/data/com..termux/files/home ~ $ javac Ops.java ~ $ javac sum.java sum.java:4: error: package mypack does not exist import mypack.*; ^ bad class file: ./Ops.class class file contains wrong class: mypack.Ops Please remove or make sure it appears in the correct subdirectory of the classpath.

15th Jan 2024, 8:26 AM
Yaniv B
Yaniv B - avatar
2 Answers
+ 1
Did you save the files in a directory named after your package?
3rd Feb 2024, 6:09 PM
Buterbrod:)
Buterbrod:) - avatar
+ 1
I've fixed it thk u
15th Feb 2024, 9:02 AM
Yaniv B
Yaniv B - avatar