package com.sysutil.util;

/* thishi duo zhu
*/
// dan zhshi
import com.sysutil.util.*;
class Example
{
public static void main(String[] args)
{
DateTool datato = new DataTool();
String stdd = DateTool.getDateTime();
System.out.println(stdd);
}
}
     DateTool datato = new DataTool();
日期类中所有成员方法都是static的。 new对象出现错误 :

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
DataTool cannot be resolved to a type

at com.sysutil.util.Example.main(Example.java:11)

Java 出现cannot be resolved to a type的更多相关文章

  1. JSP页面java代码报错:Purgoods cannot be resolved to a type

    错误提示 : Purgoods cannot be resolved to a type Purgoods不能解析为一个类型 原因 : 缺少引入Purgoods类 页面中引入java类,执行java代 ...

  2. cannot be resolved to a type (Java)

    最近经常遇到cannot be resolved to a type (Java)报错,以下为在网上找到的解决方案: 1.先看看有没有引用相关jar包2.检查jar是否引用了多个相同的,或者多个jar ...

  3. HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    HttpServletRequest cannot be resolved to a type The superclass "javax.servlet.http.HttpServlet& ...

  4. 1,eclipse导入项目jdk版本不一样解决方案 2,java报javax.servlet.jsp cannot be resolved to a type

    一:eclipse导入项目jdk版本不一样解决方案 参考博文: https://www.cnblogs.com/chenmingjun/p/8472885.html 选中项目右键 --> Pro ...

  5. ImageView cannot be resolved to a type

    问题: ImageView cannot be resolved to a type 报这样的错误是没有加载MainActivity.java文件中加入 import android.widget.I ...

  6. myeclipse 开发环境下,提示 String cannot be resolved to a type

    从SVN上下载项目,所有代码都有下来,在本地编译,java类总是报出n多红叉,惨不忍睹,String cannot be resolved to a type都出来了,以为是jar包未被加载,于是pr ...

  7. Eclipse “cannot be resolved to a type” 错误

    eclipse中遇到了“XX cannot be resolved to a type”的报错信息.网上找了些资料,本文将做以简单总结.     (1)jdk不匹配(或不存在) 项目指定的jdk为“j ...

  8. The import java.io cannot be resolved

    在导入一个新项目后出现 The import java.io cannot be resolved.String cannot be resolved to a type 解决: 将JRE Syste ...

  9. The import java.util cannot be resolved The import javax.servlet cannot be resolved

    The import java.util cannot be resolved 原因:这是由于你的项目buildpath不对 解决方案:右键项目-------buildpath--------最下面那 ...

随机推荐

  1. Jeecg 支持多视图设置

    <!-- 视图解析器1:html视图解析器 必须先配置freemarkerConfig,注意html是没有prefix前缀属性的 --> <bean id="freemar ...

  2. IntelliJ Idea 常用10款插件(提高开发效率)

    出自:https://blog.csdn.net/weixin_41846320/article/details/82697818 插件安装方式: 1.Background Image Plus 这款 ...

  3. Arch Linux 启用 MTU 探测

    最近在家里经常遇到 ssh 超时的问题,一开始也没太当回事,感觉是网络不稳定导致的,但是后来慢慢的发现这种超时问题只会出现在跟 ssh 相关的程序中,例如 git.ssh.这成功的引起了我的注意,于是 ...

  4. MTCNN代码解读

    代码基于bm1682芯片 #include "mtcnn.hpp" #include "utils.hpp" using namespace std; usin ...

  5. Centos 7搭建Gitlab服务器超详细

    一. 安装并配置必要的依赖关系在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问. 1.安装ss ...

  6. Flutter 增加三方库卡在flutter package get 的解决办法

    修改 pubspec.yaml 文件增加第三方库之后,AndroidStudio 像往常一样提示 需要 package get. 然后一直卡在 Running "flutter packag ...

  7. 【1】【leetcode-5】最长回文子串

    给定一个字符串 s,找到 s 中最长的回文子串.你可以假设 s 的最大长度为 1000. 示例 1: 输入: "babad"输出: "bab"注意: " ...

  8. java转换编码报错java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern

    Exception in thread "main" java.lang.IllegalArgumentException: URLDecoder: Illegal hex cha ...

  9. 2019-07-24 Smarty模板引擎的简单应用

    smarty是什么? Smarty是一个使用PHP写出来的模板引擎,是业界最著名的PHP模板引擎之一.Smarty分离了逻辑代码和外在的内容,提供一种易于管理和使用的方法,用来将原本与HTML代码混杂 ...

  10. 全网最easy的better-scroll实现上拉加载和下拉刷新

    前言 移动端页面常见的一种效果:下拉刷新(pulldownrefresh)和上拉加载(pullupload),目的都是为了增强用户的体验效果,因此各种移动端滑动插件也是层出不穷,今天小编也在这里给大家 ...