| 1 16 package com.j2biz.pencil.test.scenario.impl; 17 18 import com.j2biz.pencil.test.additional.TestLog; 19 import com.j2biz.pencil.test.stuff.Person; 20 21 public class TypeCheck { 22 23 24 public static void main(String [] args) { 25 String varStr = new String ("string variable"); 26 TestLog.debug( "TypeCheck.main.varStr = "+ varStr); 27 28 int varInt = new Integer (1).intValue(); 29 TestLog.debug( "TypeCheck.main.varInt = " + varInt ); 30 31 short varShort = new Short ((short)1).shortValue(); 32 TestLog.debug( "TypeCheck.main.varShort = " + varShort ); 33 34 byte varByte = new Byte ( (byte) 1).byteValue(); 35 TestLog.debug("TypeCheck.main.varByte = " +varByte ); 36 37 char varChar = new Character ( 'a' ).charValue(); 38 TestLog.debug("TypeCheck.main.varChar = " + varChar ); 39 40 long varLong = new Long (1L).longValue(); 41 TestLog.debug("TypeCheck.main.varLong = " +varLong ); 42 43 double varDouble = new Double (1L).doubleValue(); 44 TestLog.debug("TypeCheck.main.varDouble = " + varDouble ); 45 46 float varFloat = new Float (1L).floatValue(); 47 TestLog.debug("TypeCheck.main.varFloat = " +varFloat ); 48 49 Person person = new Person(1); 50 TestLog.debug("TypeCheck.main.person = " + person); 51 } 52 } 53 | Popular Tags |