title: Inside an Oracle 12 "package", how do I make a variable or function or procedure accessible or not accessible?
body: <p>I'm a former Java developer, using Oracle's SQL-Developer to create Oracle "packages."</p>
  
  <p>Oracle's websites indicate that it's possible to create an Oracle "package" in which some objects (variables, functions, procedures) are accessible "outside" the scope of the package, while others are only accessible "inside" the package.</p>
  
  <p>I.e., I'm trying to do something like this (pseudocode!), which intentionally but superficially resembles Java.</p>
  
  <p>So, I'm asking, "How does one implement functionality that is similar to (java's) PUBLIC and PRIVATE in an Oracle PL SQL package"?  ("See 'Oracle keyword' is enough to point me in the right direction.)</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>CREATE PACKAGE a 
  // header
  **PUBLIC** NUMBER nVisibleOutside := 1;
  **PRIVATE** NUMBER nNOTVisibleOutside := 14922016;
  
  PUBLIC PROCEDURE pVisibleOutside ();
  PUBLIC FUNCTION fNOTVisibleOutside();
  
  /* other stuff */
  
  // body
  
  /* actual code of pVisibleOutside and fNOTVisibleOutside(); */
  
  
  END a;
  </code></pre>