"javax.servlet.http.HttpServlet" was not found on the Java Build Path
原来Javaweb工程类中没有添加Tomcat运行时相关类导致。2、切换到Java Build Path界面中的Orader and Export,选择Tomcat。注意:
Got fatal error 1236 from master when reading data from binary log
Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the first event 'mysqlbin.000031' at 120, the last event read from 'D:\mysql-5.6.17-winx64\mysql-5.6.17-winx64\data\mysqlbin.000031' at 120...
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'原因:mysql数据库的user表里,存在用户名为空的账户即匿名账户,导致登录的时候是虽然用的是root,但实际是匿名登录的解决方法:在MySQL的配置文件的【mysqld】下加一行skip-grant-tables即可,然后重启MySQL服务,就可以不通过密码登...
为什么java不推荐使用vector
从网上各处搜集的知识整理出来1.因为vector是线程安全的,所以效率低,这容易理解,类似StringBuffer2.Vector空间满了之后,扩容是一倍,而ArrayList仅仅是一半3.Vector分配内存的时候需要连续的存储空间,如果数据太多,容易分配内存失败4.只能在尾部进行插入和删除操作,效率低...
String、StringBuffer与StringBuilder之间区别
1.执行速度:StringBuilder > StringBuffer > String 2. String
为什么在static方法中不能有this,也不能有super
因为static方法和类的实例(对象)是两码事,它只在类装载的时候(即编译的时候或者javac命令的时候)初始化,被称作类级变量(属于类);而类的实例是在程序运行的时候(即Java命令的时候)初始化,被称作对象级变量(属于对象);this表示这个类的当前实例,super表示父类的当前实例,static是属于类的,this是类的一...
为什么super(…)或this(…)调用语句只能作为构造函数中的第一句出现?
class A { A() { System.out.println("You call super class non-args constructor!"); }} class B extends A { B() { //这里,编译器将自动加上 super(); System.out.println("You call subclass constructor!"); } B(String n) {...
为什么super(…)和this(…)调用语句不能同时在一个构造器中出现
构造函数必须出现在第一行上。所以,注定了你只能调用一个构造函数。默认的,父类的或者本类的其它构造,你自己选一个。
No enclosing instance of type Outer is accessible.
No enclosing instance of type Outer is accessible. Must qualify the allocation with an enclosing instance of type Outer (e.g. x.new A() where x is an instance of Outer).点击(此处)折叠或打开class Outer { class Inner {...
为什么不能根据返回类型区分重载?
重载(Overload)和重写(Override)的区别。重载的方法能否根据返回类型进行区分?答:方法的重载和重写都是实现多态的方式,区别在于前者实现的是编译时的多态性,而后者实现的是运行时的多态性。重载发生在一个类中,同名的方法如果有不同的参数列表(参数类型不同、参数个数不同或者二者都不同)则视为重载;重写发生...
java中break标记的使用
break适用范围:只能用于switch或者是循环语句中。break作用:1. break用于switch语句的作用是结束一个switch语句。2. break用于循环语句中的作用是结束当前所在的循环语句。笔试题目:break目前位于内层的for循环,如何才能让break作用于外层 的for循环。可以标记解决标记的命名只要符合标识符的命名规则即可。...
Java中hashCode的作用
以下是关于HashCode的官方文档定义hashcode方法返回该对象的哈希码值。支持该方法是为哈希表提供一些优点,例如,java.util.Hashtable 提供的哈希表。 hashCode 的常规协定是: 在 Java 应用程序执行期间,在同一对象上...
eclipse设置jsp字符编码
点击Windows,选中Preferences,找到Web菜单下的JSP Files,修改Encoding为ISO 10646/Unicode(UTF-8)即可
Loading class `com.mysql.jdbc.Driver
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary....... WARN: Establishing SSL connection without server's identity v...
MAVEN提示invalid LOC header (bad signature)
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)at java.util.zip.ZipFile.read(Native Method)at java.util.zip.ZipFile.access$1400(ZipFile.java:60)at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Zip...
MySQL server PID file could not be found!
root@s1 Downloads]# service mysql restartMySQL server PID file could not be found! [FAILED][root@s1 Downloads]# service mysql stopMySQL server PID file could not be found! &nbs...
Error 1045(28000) Access Denied for user 'root'@'localhost'
Error 1045(28000) Access Denied for user 'root'@'localhost'1.修改my.ini配置文件,找到[mysqld]一行,在下面添加skip-grant-tables后保存,重启mysql服务。2.然后执行 mysql -u root mysql mysql>update user set password=password('newpassword') where user='root'; &nbs...
MySQL之——RPM方式安装MySQL5.6
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/539346561.检查MySQL及相关RPM包 检查MySQL及相关RPM包,是否安装,如果有安装,则移除(rpm –e 名称)[plain] copy [root@localhost ~]# rpm -qa | grep -i mysq...
国内linux apt-get sources.list 163 正规源
deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted deb-src http://mirror...
设计模式学习
作者:Pickle 出处:http://www.cnblogs.com/wxisme/ 设计模式总结 设计模式(Design Patterns)是可复用面向对象软件的基础,是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码,让代码更容易被他人...