Both encapsulation and immutability are important mechanisms, that support good software engineering practice. Encapsulation
protects a variable against all kinds of access attempts from certain sections of the program. Immutability protects a variable
only against write access attempts, irrespective of the program region from which these attempts are made. Taking mostly an
empirical approach, we study these concepts and their interaction in JAVA.We propose code analysis techniques, which, using
the new sealing information, can help to identify variables as encapsulated, immutable, or both.
Work done in part while with IBM Research Lab in Haifa.