About Java Virtual Machine

The compilation mechanism in java

        Unlike C and C++,java compiles the source text into binary code separately not a single executable application, which also determines the method java stores the references of other objects and links them when needs.Besides, the class binary code are coded with UTF-8, which is notable for all character support and compatible with ASCII for mainly the binary class consists of.

        In the binary class, there are seven parts such as method area, class info area whcih describle all the information of the class itself and its references. In memory, there is only one copy of each class and its method, but there can exist several copy of data.The data and program are stored separately in memory.The string quoted with double quotes is actually a constant which is different from the string generated from the String() class.The latter is an instance object while the former has only one copy in memory.

 

The xsd(xml schema definition)

        Both dtd(document type definition) and xsd are used to constrain the xml content. Every xml file can only has one dtd while has several schemas.And there are more datatypes in schema than dtd.

 

<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

 

  1.  the default namespace is http://www.springframework.org/schema/beans,so the elements within that namespace are used without prefix in the xml file.
  2.  xmlns:xsi , i think, is removeable.
  3. the schema location are listed with namespace and xsd file location.

java.io

       There are two kinds streams in java,one is byte stream, the other is character stream.

  1. InputStream and OutputStream are abstact classes.
  2. ObjectInputStream and ObjectOutputStream are used to persist the object in memory.
  3. DataInputStream and DataOutputStream are used to read and write data types such as int,long,double.
  4. BufferedInputStream and BufferedOutputStream are second level stream which need InputStream and OutputStream as contrcut argument.

TreeSet and Comparator

      TreeSet is class to add element in sorted way.The sort direction and method are implements in the Comparator.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值