alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (JDK-8020324.js.EXPECTED)

This example Java source code file (JDK-8020324.js.EXPECTED) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

read, sanity, two-way, write

The JDK-8020324.js.EXPECTED Java example source code


==== Two-way read-write instance field ====
obj1.publicInt = 13: 13
bean.publicInt: 13
bean.publicInt = 15: 15
obj1.publicInt: 15

==== Read only public instance field ====
obj1.publicFinalInt: 42
obj1.publicFinalInt = 16: 16
obj1.publicFinalInt: 42
bean.publicFinalInt: 42

==== Two-way read-write instance property ====
obj1.readWrite = 17: 17
bean.readWrite: 17
bean.readWrite = 18: 18
obj1.readWrite: 18
obj1.getReadWrite(): 18
obj1.setReadWrite(19): null
obj1.readWrite: 19
bean.readWrite: 19

==== Read only instance property ====
obj1.readOnly: 123
obj1.readOnly = 20: 20
obj1.readOnly: 123
obj1.getReadOnly(): 123
bean.getReadOnly(): 123

==== Write only instance property ====
obj1.writeOnly = 21: 21
obj1.writeOnly: undefined
bean.writeOnly: undefined
bean.peekWriteOnly(): 21

==== Two-way read-write public static field ====
obj2.publicStaticInt = 22: 22
PropertyBind.publicStaticInt: 22
PropertyBind.publicStaticInt = 23: 23
obj2.publicStaticInt: 23

==== Read only public static field ====
obj2.publicStaticFinalInt: 2112
obj2.publicStaticFinalInt = 24: 24
obj2.publicStaticFinalInt: 2112
PropertyBind.publicStaticFinalInt: 2112

==== Two-way read-write static property ====
obj2.staticReadWrite = 25: 25
PropertyBind.staticReadWrite: 25
PropertyBind.staticReadWrite = 26: 26
obj2.staticReadWrite: 26
obj2.getStaticReadWrite(): 26
obj2.setStaticReadWrite(27): null
obj2.staticReadWrite: 27
PropertyBind.staticReadWrite: 27

==== Read only static property ====
obj2.staticReadOnly: 1230
obj2.staticReadOnly = 28: 28
obj2.staticReadOnly: 1230
obj2.getStaticReadOnly(): 1230
PropertyBind.getStaticReadOnly(): 1230

==== Write only static property ====
obj2.staticWriteOnly = 29: 29
obj2.staticWriteOnly: undefined
PropertyBind.staticWriteOnly: undefined
PropertyBind.peekStaticWriteOnly(): 29

==== Sanity check to ensure property values remained what they were ====
obj1.publicInt: 15
bean.publicInt: 15
obj1.publicFinalInt: 42
bean.publicFinalInt: 42
obj1.readWrite: 19
bean.readWrite: 19
obj1.readOnly: 123
bean.readOnly: 123
bean.peekWriteOnly(): 21
obj2.publicStaticInt: 23
PropertyBind.publicStaticInt: 23
obj2.publicStaticFinalInt: 2112
PropertyBind.publicStaticFinalInt: 2112
obj2.staticReadWrite: 27
PropertyBind.staticReadWrite: 27
obj2.staticReadOnly: 1230
PropertyBind.staticReadOnly: 1230
PropertyBind.peekStaticWriteOnly(): 29

Other Java examples (source code examples)

Here is a short list of links related to this Java JDK-8020324.js.EXPECTED source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.