Umple Builtin Data Types
[Previous]  [Next] 
|
User Manual [Previous]  [Next] Umple Builtin Data TypesThe following example illustrates the data types available for Umple attributes. Except as specified, they will generate primitive datatypes in Java. Initialization of values can be performed in a manner similar to Java or C++. Initialization of Dates uses yyyy-mm-dd format, and initialization of Times use hh:mm:dd format. Exampleclass Demo { Integer i; Integer i2 = 5; String str; // the default if no type is specified str2; str3 = ""; Float flt; Double dbl; Double dbl2 = 8.0; Boolean bln; Boolean bln2 = false; Date dte; // In Java. uses the java.sql.Date class Date dte2 = "2018-09-25"; Time tme; // In Java. uses the java.sql.Time class Time tme2 = "14:56:50"; } Load the above code into UmpleOnline Example Using a Native Java Type Rather than a Builtin Umple Typeclass DemoNonUmpleType { // If you use a non-umple type that is specific to a base // programming language, then code will be generated // consistent with that type, but generation of code // independent of base language is no longer possible int demoJavaInt; } Load the above code into UmpleOnline |