正在加载图片...
What is Type? t A type restricts the kind and range of values a data item or an expression could take e.g. Sex→[M,F] HKID→K123456(7) * Type must be matched(各從其類) e.g. String name ="Chan Tai Man"i string myName 123 //123 is a number, neither text nor String // 123"however, is a String K凶心 2008-20092a Michael Fung, CS&E, The Chinese University of HK2008-2009 2a Michael Fung, CS&E, The Chinese University of HK 15 What is Type? A type restricts the kind and range of values a data item or an expression could take. – e.g. Sex → [‘M’, ‘F’] HKID → K123456(7) Type must be matched (各從其類) – e.g. String name = "Chan Tai Man"; String myName = 123; // 123 is a number, neither text nor String // "123" however, is a String ✓ 
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有