-
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: casting
Assign integer value to byte and short variable
Integer literals and constants can be assigned to byte and short variables without casting, providing the values are within range. Values that are out of range require explicit casting, but this can produce unwanted results due to the way signed … Continue reading
Upcasting and downcasting Java reference variables
Reference variables may be cast between different types. Casting from a subtype to a supertype is referred to as upcasting and is an inherently safe operation. Casting from a supertype to a subtype is referred to as downcasting and is … Continue reading
Working with arrays of objects
Consider the following UML class diagram which shows the relationship between a superclass (Vehicle) and two subclasses (Motorbike and Car). Because Motorbike is a Vehicle and Car is a Vehicle, we can create an array of vehicles like this: The … Continue reading