-
Recent Posts
Recent Comments
- Brian on How to plot multiple UK addresses (by postcode) on a Google Map
- Mark on How to plot multiple UK addresses (by postcode) on a Google Map
- Mark on How to plot multiple UK addresses (by postcode) on a Google Map
- Brian on Interview advice for PGCE ICT with Computing at KCL / IOE
- Brian on Blatant racist discrimination in advertisements
Tag Cloud
abstract accommodation array bursary Chrome date email enumerated type exam Excel fields finance generics Google greenfoot GTP GTTR hardware ICT interview Java KCL laptop linux literature review LMC London network news object OOP Oracle PGCE primary programming QTS QTS tests SER shortcut SSA static travel ubuntu UML variablesArchives
Categories
Meta
Tag Archives: fields
Initializing fields in Java classes
It is often possible to initialize class fields and instance fields as they are declared. For example, This works well when there is a simple assignment. However, for more complicated assignments we may need to use an initialization block. A … Continue reading
Using qualified names to access shadowed fields
This example code shows how we can use qualified names to access shadowed fields when programming in Java. Class declaration with shadowed fields:
Passing Java objects by value
Primitive data types (such as int, char, etc.) are passed into methods by value, as demonstrated in the following example. Reference data types (this includes objects) are also passed by value. When a method returns, the passed in object still … Continue reading