用法 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.
2023-08-16 18:08:04
用法 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.