daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.myitcareercoach;
  2.  
  3. class MyFirstClass {
  4.     private String name;
  5. }
  6.  
  7. public class PrivateAccessExamples {
  8.  
  9.     public static void main(String[] args) {
  10.         MyFirstClass myFirstClass = new MyFirstClass();
  11.         myFirstClass.name; // Compiler error - can't access
  12.     }
  13.  
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top