0

a very beginner question... i'm a newbie in programming... just started java and read about packaging... i created i directory called firstproject and put a directory with one class inside of it and a FirstProject source file in the firstproject directory itself. i made a class in that package directory that has a private string in it and tried to invoke from FirstProject source file but getting compile error that the string is private... i tried changing the string into protected or even public but still getting this error... this is the error: Sticker(String) is not public in Sticker; cannot be accessed from outside package

mahdi.qf
  • 1
  • 1
  • 1
    please show your code – Nicolas Filotto Sep 15 '16 at 11:13
  • Here is a good table for understanding the access modifiers: http://stackoverflow.com/a/33627846/276052 – aioobe Sep 15 '16 at 11:19
  • Possible duplicate of [In Java, difference between default, public, protected, and private](http://stackoverflow.com/questions/215497/in-java-difference-between-default-public-protected-and-private) – Draken Sep 15 '16 at 11:24

0 Answers0