Java vs C++ (7)导入

用法 import VS include

Java   import java.util.regex.Pattern;

package com.slim;



(1)假设少了; 会warning: 

C++   #include <iostream>

if add ; after >, warning: extra tokens at end of #include directive [enabled by default]

(2)JAVA存在包的概念,在相同包内不需要import.




 

posted @ 2013-11-14 19:53  pangbangb  阅读(202)  评论(0编辑  收藏  举报