How to create a package | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to create a package

Commands & examples plzz

19th Apr 2017, 4:06 PM
Harin Rajan K.R
Harin Rajan K.R - avatar
1 Answer
+ 1
at the begin of your class file you write your package name: package my.example.package //imports public class MyClass {} other file: package my.example.package.sub.package import my.example.package.MyClass; public class User{ private MyClass mc; } in most ides eg. eclipse you arrange your packages in folders but this is done automatically if you ho to new package.
19th Apr 2017, 4:56 PM
No One
No One - avatar